@Override protected void configure() { install(new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders()); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); // ChunkedInput entity support bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); } }
injectionManager.register(new ClientBinder(runtimeCfgState.getProperties()));
injectionManager.register(new ClientBinder(runtimeCfgState.getProperties()));
@Override protected void configure() { install(new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders()); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); // ChunkedInput entity support bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); } }
injectionManager.register(new ClientBinder(runtimeCfgState.getProperties()));
@Override protected void configure() { install(new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders()); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); // ChunkedInput entity support bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); } }
injectionManager.register(new ClientBinder(runtimeCfgState.getProperties()));
@Override protected void configure() { install(new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders()); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.referenceFactory()).to(new GenericType<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); // ChunkedInput entity support bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); } }
runtimeCfgState.markAsShared(); final ServiceLocator locator = Injections.createLocator(new ClientBinder(runtimeCfgState.getProperties())); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);
@Override protected void configure() { install(new RequestScope.Binder(), // must go first as it registers the request scope instance. new JerseyErrorService.Binder(), new ContextInjectionResolver.Binder(), new ServiceFinderBinder<AutoDiscoverable>(AutoDiscoverable.class, clientRuntimeProperties, RuntimeType.CLIENT)); bindFactory(ReferencingFactory.<ClientConfig>referenceFactory()).to(new TypeLiteral<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.<ClientRequest>referenceFactory()).to(new TypeLiteral<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); asyncThreadPoolSize = (asyncThreadPoolSize < 0) ? 0 : asyncThreadPoolSize; bind(asyncThreadPoolSize).named("ClientAsyncThreadPoolSize"); bind(DefaultClientAsyncExecutorProvider.class).to(ExecutorServiceProvider.class).in(Singleton.class);
runtimeCfgState.markAsShared(); final ServiceLocator locator = Injections.createLocator(new ClientBinder(runtimeCfgState.getProperties())); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);
@Override protected void configure() { install(new RequestScope.Binder(), // must go first as it registers the request scope instance. new JerseyErrorService.Binder(), new ContextInjectionResolver.Binder(), new ServiceFinderBinder<AutoDiscoverable>(AutoDiscoverable.class, clientRuntimeProperties, RuntimeType.CLIENT)); bindFactory(ReferencingFactory.<ClientConfig>referenceFactory()).to(new TypeLiteral<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.<ClientRequest>referenceFactory()).to(new TypeLiteral<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); asyncThreadPoolSize = (asyncThreadPoolSize < 0) ? 0 : asyncThreadPoolSize; bind(asyncThreadPoolSize).named("ClientAsyncThreadPoolSize"); bind(DefaultClientAsyncExecutorProvider.class).to(ExecutorServiceProvider.class).in(Singleton.class);
runtimeCfgState.markAsShared(); final ServiceLocator locator = Injections.createLocator(new ClientBinder(runtimeCfgState.getProperties())); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);
@Override protected void configure() { install(new RequestScope.Binder(), // must go first as it registers the request scope instance. new JerseyErrorService.Binder(), new ContextInjectionResolver.Binder(), new ServiceFinderBinder<AutoDiscoverable>(AutoDiscoverable.class, clientRuntimeProperties, RuntimeType.CLIENT)); bindFactory(ReferencingFactory.<ClientConfig>referenceFactory()).to(new TypeLiteral<Ref<ClientConfig>>() { }).in(RequestScoped.class); bindFactory(RequestContextInjectionFactory.class) .to(ClientRequest.class) .in(RequestScoped.class); bindFactory(ReferencingFactory.<ClientRequest>referenceFactory()).to(new TypeLiteral<Ref<ClientRequest>>() { }).in(RequestScoped.class); bindFactory(PropertiesDelegateFactory.class, Singleton.class).to(PropertiesDelegate.class).in(RequestScoped.class); bind(ChunkedInputReader.class).to(MessageBodyReader.class).in(Singleton.class); asyncThreadPoolSize = (asyncThreadPoolSize < 0) ? 0 : asyncThreadPoolSize; bind(asyncThreadPoolSize).named("ClientAsyncThreadPoolSize"); bind(DefaultClientAsyncExecutorProvider.class).to(ExecutorServiceProvider.class).in(Singleton.class);