use of com.navercorp.pinpoint.profiler.AgentInformation in project pinpoint by naver.
the class AgentInfoSenderProvider method get.
@Override
public AgentInfoSender get() {
final EnhancedDataSender enhancedDataSender = this.enhancedDataSenderProvider.get();
final AgentInformation agentInformation = this.agentInformationProvider.get();
final AgentInfoSender.Builder builder = new AgentInfoSender.Builder(enhancedDataSender, agentInformation, jvmInformation);
builder.sendInterval(profilerConfig.getAgentInfoSendRetryInterval());
return builder.build();
}
use of com.navercorp.pinpoint.profiler.AgentInformation in project pinpoint by naver.
the class PinpointClientFactoryProvider method get.
public PinpointClientFactory get() {
PinpointClientFactory pinpointClientFactory = new DefaultPinpointClientFactory();
pinpointClientFactory.setTimeoutMillis(1000 * 5);
AgentInformation agentInformation = this.agentInformation.get();
Map<String, Object> properties = toMap(agentInformation);
boolean isSupportServerMode = profilerConfig.isTcpDataSenderCommandAcceptEnable();
if (isSupportServerMode) {
pinpointClientFactory.setMessageListener(commandDispatcher);
pinpointClientFactory.setServerStreamChannelMessageListener(commandDispatcher);
properties.put(HandshakePropertyType.SUPPORT_SERVER.getName(), true);
properties.put(HandshakePropertyType.SUPPORT_COMMAND_LIST.getName(), commandDispatcher.getRegisteredCommandServiceCodes());
} else {
properties.put(HandshakePropertyType.SUPPORT_SERVER.getName(), false);
}
pinpointClientFactory.setProperties(properties);
return pinpointClientFactory;
}
Aggregations