use of com.navercorp.pinpoint.collector.grpc.config.GrpcStreamConfiguration in project pinpoint by naver.
the class SpanServerTestMain method newSpanBindableService.
private ServerServiceDefinition newSpanBindableService(Executor executor) throws Exception {
GrpcStreamConfiguration streamConfiguration = newStreamConfiguration();
FactoryBean<ServerInterceptor> interceptorFactory = new StreamExecutorServerInterceptorFactory(executor, Executors.newSingleThreadScheduledExecutor(), streamConfiguration);
((StreamExecutorServerInterceptorFactory) interceptorFactory).setBeanName("SpanService");
ServerInterceptor interceptor = interceptorFactory.getObject();
SpanService spanService = new SpanService(new MockDispatchHandler(), new DefaultServerRequestFactory());
return ServerInterceptors.intercept(spanService, interceptor);
}
use of com.navercorp.pinpoint.collector.grpc.config.GrpcStreamConfiguration in project pinpoint by naver.
the class StatServerTestMain method newStatBindableService.
private ServerServiceDefinition newStatBindableService(Executor executor) throws Exception {
GrpcStreamConfiguration streamConfiguration = newStreamConfiguration();
FactoryBean<ServerInterceptor> interceptorFactory = new StreamExecutorServerInterceptorFactory(executor, Executors.newSingleThreadScheduledExecutor(), streamConfiguration);
ServerInterceptor interceptor = interceptorFactory.getObject();
StatService statService = new StatService(new MockDispatchHandler(), new DefaultServerRequestFactory());
return ServerInterceptors.intercept(statService, interceptor);
}
Aggregations