Java Code Examples for org.springframework.beans.factory.FactoryBean#getObject()

The following examples show how to use org.springframework.beans.factory.FactoryBean#getObject() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpanServerTestMain.java    From pinpoint with Apache License 2.0 5 votes vote down vote up
private ServerServiceDefinition newSpanBindableService(Executor executor) throws Exception {
    FactoryBean<ServerInterceptor> interceptorFactory = new StreamExecutorServerInterceptorFactory(executor, 100, Executors.newSingleThreadScheduledExecutor(), 1000, 10);
    ((StreamExecutorServerInterceptorFactory) interceptorFactory).setBeanName("SpanService");

    ServerInterceptor interceptor = interceptorFactory.getObject();
    SpanService spanService = new SpanService(new MockDispatchHandler(), new DefaultServerRequestFactory());
    return ServerInterceptors.intercept(spanService, interceptor);
}
 
Example 2
Source File: StatServerTestMain.java    From pinpoint with Apache License 2.0 4 votes vote down vote up
private ServerServiceDefinition newStatBindableService(Executor executor) throws Exception {
    FactoryBean<ServerInterceptor> interceptorFactory = new StreamExecutorServerInterceptorFactory(executor, 100, Executors.newSingleThreadScheduledExecutor(), 1000, 10);
    ServerInterceptor interceptor = interceptorFactory.getObject();
    StatService statService = new StatService(new MockDispatchHandler(), new DefaultServerRequestFactory());
    return ServerInterceptors.intercept(statService, interceptor);
}