use of com.navercorp.pinpoint.rpc.client.PinpointClient in project pinpoint by naver.
the class PluginApplicationContextModule method configure.
@Override
protected void configure() {
final DataSender spanDataSender = newUdpSpanDataSender();
logger.debug("spanDataSender:{}", spanDataSender);
bind(DataSender.class).annotatedWith(SpanDataSender.class).toInstance(spanDataSender);
final DataSender statDataSender = newUdpStatDataSender();
logger.debug("statDataSender:{}", statDataSender);
bind(DataSender.class).annotatedWith(StatDataSender.class).toInstance(statDataSender);
StorageFactory storageFactory = newStorageFactory(spanDataSender);
logger.debug("spanFactory:{}", spanDataSender);
bind(StorageFactory.class).toInstance(storageFactory);
bind(PinpointClientFactory.class).toProvider(Providers.of((PinpointClientFactory) null));
bind(PinpointClient.class).toProvider(Providers.of((PinpointClient) null));
EnhancedDataSender enhancedDataSender = newTcpDataSender();
logger.debug("enhancedDataSender:{}", enhancedDataSender);
bind(EnhancedDataSender.class).toInstance(enhancedDataSender);
ServerMetaDataHolder serverMetaDataHolder = newServerMetaDataHolder();
logger.debug("serverMetaDataHolder:{}", serverMetaDataHolder);
bind(ServerMetaDataHolder.class).toInstance(serverMetaDataHolder);
}
use of com.navercorp.pinpoint.rpc.client.PinpointClient in project pinpoint by naver.
the class ClusterTest method clusterTest3.
@Test
public void clusterTest3() throws Exception {
PinpointClientFactory clientFactory = null;
PinpointClient client = null;
ZooKeeper zookeeper = null;
try {
zookeeper = new ZooKeeper(zookeeperAddress, 5000, null);
awaitZookeeperConnected(zookeeper);
Assert.assertEquals(0, clusterConnectionManager.getClusterList().size());
clientFactory = new DefaultPinpointClientFactory();
clientFactory.setMessageListener(SimpleMessageListener.INSTANCE);
client = clientFactory.connect(DEFAULT_IP, acceptorPort);
awaitPinpointClientConnected(clusterConnectionManager);
Assert.assertEquals(1, clusterConnectionManager.getClusterList().size());
} finally {
closePinpointSocket(clientFactory, client);
if (zookeeper != null) {
zookeeper.close();
}
}
}
use of com.navercorp.pinpoint.rpc.client.PinpointClient in project pinpoint by naver.
the class MockApplicationContextModule method configure.
@Override
protected void configure() {
final DataSender spanDataSender = newUdpSpanDataSender();
logger.debug("spanDataSender:{}", spanDataSender);
bind(DataSender.class).annotatedWith(SpanDataSender.class).toInstance(spanDataSender);
final DataSender statDataSender = newUdpStatDataSender();
logger.debug("statDataSender:{}", statDataSender);
bind(DataSender.class).annotatedWith(StatDataSender.class).toInstance(statDataSender);
StorageFactory storageFactory = newStorageFactory(spanDataSender);
logger.debug("spanFactory:{}", spanDataSender);
bind(StorageFactory.class).toInstance(storageFactory);
bind(PinpointClientFactory.class).toProvider(Providers.of((PinpointClientFactory) null));
bind(PinpointClient.class).toProvider(Providers.of((PinpointClient) null));
EnhancedDataSender enhancedDataSender = newTcpDataSender();
logger.debug("enhancedDataSender:{}", enhancedDataSender);
bind(EnhancedDataSender.class).toInstance(enhancedDataSender);
ServerMetaDataHolder serverMetaDataHolder = newServerMetaDataHolder();
logger.debug("serverMetaDataHolder:{}", serverMetaDataHolder);
bind(ServerMetaDataHolder.class).toInstance(serverMetaDataHolder);
bind(PluginContextLoadResult.class).toProvider(MockPluginContextLoadResultProvider.class).in(Scopes.SINGLETON);
}
use of com.navercorp.pinpoint.rpc.client.PinpointClient in project pinpoint by naver.
the class PinpointClientProvider method get.
@Override
public PinpointClient get() {
PinpointClientFactory pinpointClientFactory = clientFactory.get();
PinpointClient pinpointClient = ClientFactoryUtils.createPinpointClient(profilerConfig.getCollectorTcpServerIp(), profilerConfig.getCollectorTcpServerPort(), pinpointClientFactory);
return pinpointClient;
}
use of com.navercorp.pinpoint.rpc.client.PinpointClient in project pinpoint by naver.
the class DefaultApplicationContext method closeTcpDataSender.
private void closeTcpDataSender() {
final EnhancedDataSender tcpDataSender = this.tcpDataSender;
if (tcpDataSender != null) {
tcpDataSender.stop();
}
final PinpointClient client = this.client;
if (client != null) {
client.close();
}
final PinpointClientFactory clientFactory = this.clientFactory;
if (clientFactory != null) {
clientFactory.release();
}
}
Aggregations