use of com.navercorp.pinpoint.profiler.receiver.service.EchoService in project pinpoint by naver.
the class ProfilerCommandServiceLocatorTest method basicFunctionTest1.
@Test
public void basicFunctionTest1() {
ProfilerCommandLocatorBuilder builder = new ProfilerCommandLocatorBuilder();
builder.addService(new EchoService());
builder.addService(new EchoService());
DefaultProfilerCommandServiceLocator commandServiceLocator = (DefaultProfilerCommandServiceLocator) builder.build();
short commandEcho = TCommandType.ECHO.getCode();
Assert.assertEquals(1, commandServiceLocator.getCommandServiceSize());
Assert.assertEquals(1, commandServiceLocator.getCommandServiceCodes().size());
Assert.assertTrue(commandServiceLocator.getCommandServiceCodes().contains(commandEcho));
Assert.assertNotNull(commandServiceLocator.getService(commandEcho));
Assert.assertNotNull(commandServiceLocator.getRequestService(commandEcho));
Assert.assertNull(commandServiceLocator.getSimpleService(commandEcho));
Assert.assertNull(commandServiceLocator.getStreamService(commandEcho));
}
use of com.navercorp.pinpoint.profiler.receiver.service.EchoService in project pinpoint by naver.
the class CommandDispatcherProvider method get.
@Override
public CommandDispatcher get() {
ProfilerCommandLocatorBuilder builder = new ProfilerCommandLocatorBuilder();
builder.addService(new EchoService());
if (activeTraceRepository != null) {
ActiveThreadService activeThreadService = new ActiveThreadService(thriftTransportConfig, activeTraceRepository);
builder.addService(activeThreadService);
}
ProfilerCommandServiceLocator commandServiceLocator = builder.build();
CommandDispatcher commandDispatcher = new CommandDispatcher(commandServiceLocator);
return commandDispatcher;
}
Aggregations