bindFactory(ReferencingFactory.<RequestProcessingContext>referenceFactory()) .to(new TypeLiteral<Ref<RequestProcessingContext>>() { }) bindFactory(ContainerRequestFactory.class) .to(ContainerRequest.class).to(ContainerRequestContext.class) .proxy(false) bindFactory(ContainerRequestFactory.class) .to(HttpHeaders.class).to(Request.class) .proxy(true).proxyForSameScope(false) bindFactory(UriRoutingContextFactory.class) .to(UriInfo.class).to(ExtendedUriInfo.class).to(ResourceInfo.class) .proxy(true).proxyForSameScope(false) bind(SecurityContextInjectee.class) .to(SecurityContext.class) .proxy(true).proxyForSameScope(false) bindFactory(CloseableServiceFactory.class) .to(CloseableService.class) .proxy(true).proxyForSameScope(false) bindFactory(AsyncContextFactory.class) .to(AsyncContext.class) .to(AsyncResponse.class) bind(DefaultBackgroundSchedulerProvider.class)
@Override protected void configure() { install(new RequestScope.Binder(), // must go first as it registers the request scope instance. new JerseyErrorService.Binder(), new ServerProcessingBinder(), new ContextInjectionResolver.Binder(), new ParameterInjectionBinder(), new JerseyClassAnalyzer.Binder(), new MessagingBinders.MessageBodyProviders(applicationProperties, RuntimeType.SERVER), new MessageBodyFactory.Binder(), new ExceptionMapperFactory.Binder(), new ContextResolverFactory.Binder(), new JaxrsProviders.Binder(), new ProcessingProviders.Binder(), new ResourceModelBinder(), new ServiceFinderBinder<>(ContainerProvider.class, applicationProperties, RuntimeType.SERVER), new JerseyResourceContext.Binder(), new ServiceFinderBinder<>(AutoDiscoverable.class, applicationProperties, RuntimeType.SERVER), new MappableExceptionWrapperInterceptor.Binder(), new MonitoringContainerListener.Binder()); //ChunkedResponseWriter bind(ChunkedResponseWriter.class).to(MessageBodyWriter.class).in(Singleton.class); // JSONP bind(JsonWithPaddingInterceptor.class).to(WriterInterceptor.class).in(Singleton.class); } }
@Override protected void configure() { install(new RequestScope.Binder(), // must go first as it registers the request scope instance. new JerseyErrorService.Binder(), new ServerProcessingBinder(), new ContextInjectionResolver.Binder(), new ParameterInjectionBinder(), new JerseyClassAnalyzer.Binder(), new MessagingBinders.MessageBodyProviders(applicationProperties, RuntimeType.SERVER), new MessageBodyFactory.Binder(), new ExceptionMapperFactory.Binder(), new ContextResolverFactory.Binder(), new JaxrsProviders.Binder(), new ProcessingProviders.Binder(), new ResourceModelBinder(), new ServiceFinderBinder<>(ContainerProvider.class, applicationProperties, RuntimeType.SERVER), new JerseyResourceContext.Binder(), new ServiceFinderBinder<>(AutoDiscoverable.class, applicationProperties, RuntimeType.SERVER), new MappableExceptionWrapperInterceptor.Binder(), new MonitoringContainerListener.Binder()); //ChunkedResponseWriter bind(ChunkedResponseWriter.class).to(MessageBodyWriter.class).in(Singleton.class); // JSONP bind(JsonWithPaddingInterceptor.class).to(WriterInterceptor.class).in(Singleton.class); } }
bindFactory(ReferencingFactory.<RequestProcessingContext>referenceFactory()) .to(new TypeLiteral<Ref<RequestProcessingContext>>() { }) bindFactory(ContainerRequestFactory.class) .to(ContainerRequest.class).to(ContainerRequestContext.class) .proxy(false) bindFactory(ContainerRequestFactory.class) .to(HttpHeaders.class).to(Request.class) .proxy(true).proxyForSameScope(false) bindFactory(UriRoutingContextFactory.class) .to(UriInfo.class).to(ExtendedUriInfo.class).to(ResourceInfo.class) .proxy(true).proxyForSameScope(false) bind(SecurityContextInjectee.class) .to(SecurityContext.class) .proxy(true).proxyForSameScope(false) bindFactory(CloseableServiceFactory.class) .to(CloseableService.class) .proxy(true).proxyForSameScope(false) bindFactory(AsyncContextFactory.class) .to(AsyncContext.class) .to(AsyncResponse.class) bind(DefaultBackgroundSchedulerProvider.class)
@Override protected void configure() { install(new RequestScope.Binder(), // must go first as it registers the request scope instance. new JerseyErrorService.Binder(), new ServerProcessingBinder(), new ContextInjectionResolver.Binder(), new ParameterInjectionBinder(), new JerseyClassAnalyzer.Binder(), new MessagingBinders.MessageBodyProviders(applicationProperties, RuntimeType.SERVER), new MessageBodyFactory.Binder(), new ExceptionMapperFactory.Binder(), new ContextResolverFactory.Binder(), new JaxrsProviders.Binder(), new ProcessingProviders.Binder(), new ResourceModelBinder(), new ServiceFinderBinder<>(ContainerProvider.class, applicationProperties, RuntimeType.SERVER), new JerseyResourceContext.Binder(), new ServiceFinderBinder<>(AutoDiscoverable.class, applicationProperties, RuntimeType.SERVER), new MappableExceptionWrapperInterceptor.Binder(), new MonitoringContainerListener.Binder()); //ChunkedResponseWriter bind(ChunkedResponseWriter.class).to(MessageBodyWriter.class).in(Singleton.class); // JSONP bind(JsonWithPaddingInterceptor.class).to(WriterInterceptor.class).in(Singleton.class); } }
bindFactory(ReferencingFactory.<RequestProcessingContext>referenceFactory()) .to(new TypeLiteral<Ref<RequestProcessingContext>>() { }) bindFactory(ContainerRequestFactory.class) .to(ContainerRequest.class).to(ContainerRequestContext.class) .proxy(false) bindFactory(ContainerRequestFactory.class) .to(HttpHeaders.class).to(Request.class) .proxy(true).proxyForSameScope(false) bindFactory(UriRoutingContextFactory.class) .to(UriInfo.class).to(ExtendedUriInfo.class).to(ResourceInfo.class) .proxy(true).proxyForSameScope(false) bind(SecurityContextInjectee.class) .to(SecurityContext.class) .proxy(true).proxyForSameScope(false) bindFactory(CloseableServiceFactory.class) .to(CloseableService.class) .proxy(true).proxyForSameScope(false) bindFactory(AsyncContextFactory.class) .to(AsyncContext.class) .to(AsyncResponse.class) bind(DefaultBackgroundSchedulerProvider.class)