use of com.navercorp.pinpoint.collector.receiver.grpc.service.SpanService 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);
}
Aggregations