Search in sources :

Example 1 with AgentInformation

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();
}
Also used : EnhancedDataSender(com.navercorp.pinpoint.profiler.sender.EnhancedDataSender) AgentInformation(com.navercorp.pinpoint.profiler.AgentInformation) AgentInfoSender(com.navercorp.pinpoint.profiler.AgentInfoSender)

Example 2 with AgentInformation

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;
}
Also used : DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) DefaultPinpointClientFactory(com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory) PinpointClientFactory(com.navercorp.pinpoint.rpc.client.PinpointClientFactory) AgentInformation(com.navercorp.pinpoint.profiler.AgentInformation)

Aggregations

AgentInformation (com.navercorp.pinpoint.profiler.AgentInformation)2 AgentInfoSender (com.navercorp.pinpoint.profiler.AgentInfoSender)1 EnhancedDataSender (com.navercorp.pinpoint.profiler.sender.EnhancedDataSender)1 DefaultPinpointClientFactory (com.navercorp.pinpoint.rpc.client.DefaultPinpointClientFactory)1 PinpointClientFactory (com.navercorp.pinpoint.rpc.client.PinpointClientFactory)1