Search in sources :

Example 1 with AgentInfoFactory

use of com.navercorp.pinpoint.profiler.util.AgentInfoFactory in project pinpoint by naver.

the class AgentInfoSenderProvider method get.

@Override
public AgentInfoSender get() {
    final EnhancedDataSender<MetaDataType> enhancedDataSender = this.enhancedDataSenderProvider.get();
    final AgentInfoFactory agentInfoFactory = this.agentInfoFactoryProvider.get();
    final AgentInfoSender agentInfoSender = new AgentInfoSender.Builder(enhancedDataSender, agentInfoFactory).sendInterval(contextConfig.getAgentInfoSendRetryInterval()).setMessageConverter(this.messageConverter).build();
    serverMetaDataRegistryService.addListener(new ServerMetaDataRegistryService.OnChangeListener() {

        @Override
        public void onServerMetaDataChange() {
            agentInfoSender.refresh();
        }
    });
    return agentInfoSender;
}
Also used : MetaDataType(com.navercorp.pinpoint.profiler.metadata.MetaDataType) ServerMetaDataRegistryService(com.navercorp.pinpoint.profiler.context.ServerMetaDataRegistryService) AgentInfoFactory(com.navercorp.pinpoint.profiler.util.AgentInfoFactory) AgentInfoSender(com.navercorp.pinpoint.profiler.AgentInfoSender)

Example 2 with AgentInfoFactory

use of com.navercorp.pinpoint.profiler.util.AgentInfoFactory in project pinpoint by naver.

the class AgentInfoSenderTest method init.

@Before
public void init() {
    agentInformation = createAgentInformation();
    serverMetaDataRegistryService = new ServerMetaDataRegistryServiceProvider().get();
    jvmInformation = new JvmInformationProvider().get();
    agentInfoFactory = new AgentInfoFactory(agentInformation, serverMetaDataRegistryService, jvmInformation);
    resultResponseMessageConverter = new ThriftMessageToResultConverter();
}
Also used : ThriftMessageToResultConverter(com.navercorp.pinpoint.profiler.context.thrift.ThriftMessageToResultConverter) JvmInformationProvider(com.navercorp.pinpoint.profiler.context.provider.JvmInformationProvider) ServerMetaDataRegistryServiceProvider(com.navercorp.pinpoint.profiler.context.provider.ServerMetaDataRegistryServiceProvider) AgentInfoFactory(com.navercorp.pinpoint.profiler.util.AgentInfoFactory) Before(org.junit.Before)

Aggregations

AgentInfoFactory (com.navercorp.pinpoint.profiler.util.AgentInfoFactory)2 AgentInfoSender (com.navercorp.pinpoint.profiler.AgentInfoSender)1 ServerMetaDataRegistryService (com.navercorp.pinpoint.profiler.context.ServerMetaDataRegistryService)1 JvmInformationProvider (com.navercorp.pinpoint.profiler.context.provider.JvmInformationProvider)1 ServerMetaDataRegistryServiceProvider (com.navercorp.pinpoint.profiler.context.provider.ServerMetaDataRegistryServiceProvider)1 ThriftMessageToResultConverter (com.navercorp.pinpoint.profiler.context.thrift.ThriftMessageToResultConverter)1 MetaDataType (com.navercorp.pinpoint.profiler.metadata.MetaDataType)1 Before (org.junit.Before)1