injectionManager.register(new MessagingBinders.MessageBodyProviders(application.getProperties(), RuntimeType.SERVER));
injectionManager.register(new MessagingBinders.MessageBodyProviders(application.getProperties(), RuntimeType.SERVER));
new ContextInjectionResolver.Binder(), new JerseyClassAnalyzer.Binder(), new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders(), new MessageBodyFactory.Binder(),
new ContextInjectionResolver.Binder(), new JerseyClassAnalyzer.Binder(), new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders(), new MessageBodyFactory.Binder(),
new ContextInjectionResolver.Binder(), new JerseyClassAnalyzer.Binder(), new MessagingBinders.MessageBodyProviders(clientRuntimeProperties, RuntimeType.CLIENT), new MessagingBinders.HeaderDelegateProviders(), new MessageBodyFactory.Binder(),
@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); } }
@Override protected void configure() { // Message body providers (both readers & writers) bindSingletonWorker(ByteArrayProvider.class); bindSingletonWorker(DataSourceProvider.class); bindSingletonWorker(FileProvider.class); bindSingletonWorker(FormMultivaluedMapProvider.class); bindSingletonWorker(FormProvider.class); bindSingletonWorker(InputStreamProvider.class); bindSingletonWorker(BasicTypesMessageProvider.class); bindSingletonWorker(ReaderProvider.class); bindSingletonWorker(RenderedImageProvider.class); bindSingletonWorker(StringMessageProvider.class); // Message body readers bind(SourceProvider.StreamSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.SaxSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.DomSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); /* * TODO: com.sun.jersey.core.impl.provider.entity.EntityHolderReader */ // Message body writers bind(StreamingOutputProvider.class).to(MessageBodyWriter.class).in(Singleton.class); bind(SourceProvider.SourceWriter.class).to(MessageBodyWriter.class).in(Singleton.class); // Header Delegate Providers registered in META-INF.services install(new ServiceFinderBinder<>(HeaderDelegateProvider.class, applicationProperties, runtimeType)); }
@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() { // Message body providers (both readers & writers) bindSingletonWorker(ByteArrayProvider.class); bindSingletonWorker(DataSourceProvider.class); bindSingletonWorker(FileProvider.class); bindSingletonWorker(FormMultivaluedMapProvider.class); bindSingletonWorker(FormProvider.class); bindSingletonWorker(InputStreamProvider.class); bindSingletonWorker(BasicTypesMessageProvider.class); bindSingletonWorker(ReaderProvider.class); bindSingletonWorker(RenderedImageProvider.class); bindSingletonWorker(StringMessageProvider.class); // Message body readers bind(SourceProvider.StreamSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.SaxSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.DomSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); /* * TODO: com.sun.jersey.core.impl.provider.entity.EntityHolderReader */ // Message body writers bind(StreamingOutputProvider.class).to(MessageBodyWriter.class).in(Singleton.class); bind(SourceProvider.SourceWriter.class).to(MessageBodyWriter.class).in(Singleton.class); install(new ServiceFinderBinder<HeaderDelegateProvider>(HeaderDelegateProvider.class, applicationProperties, runtimeType)); }
@Override protected void configure() { // Message body providers (both readers & writers) bindSingletonWorker(ByteArrayProvider.class); bindSingletonWorker(DataSourceProvider.class); bindSingletonWorker(FileProvider.class); bindSingletonWorker(FormMultivaluedMapProvider.class); bindSingletonWorker(FormProvider.class); bindSingletonWorker(InputStreamProvider.class); bindSingletonWorker(BasicTypesMessageProvider.class); bindSingletonWorker(ReaderProvider.class); bindSingletonWorker(RenderedImageProvider.class); bindSingletonWorker(StringMessageProvider.class); // Message body readers bind(SourceProvider.StreamSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.SaxSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.DomSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); /* * TODO: com.sun.jersey.core.impl.provider.entity.EntityHolderReader */ // Message body writers bind(StreamingOutputProvider.class).to(MessageBodyWriter.class).in(Singleton.class); bind(SourceProvider.SourceWriter.class).to(MessageBodyWriter.class).in(Singleton.class); install(new ServiceFinderBinder<HeaderDelegateProvider>(HeaderDelegateProvider.class, applicationProperties, runtimeType)); }
@Override protected void configure() { // Message body providers (both readers & writers) bindSingletonWorker(ByteArrayProvider.class); bindSingletonWorker(DataSourceProvider.class); bindSingletonWorker(FileProvider.class); bindSingletonWorker(FormMultivaluedMapProvider.class); bindSingletonWorker(FormProvider.class); bindSingletonWorker(InputStreamProvider.class); bindSingletonWorker(BasicTypesMessageProvider.class); bindSingletonWorker(ReaderProvider.class); bindSingletonWorker(RenderedImageProvider.class); bindSingletonWorker(StringMessageProvider.class); // Message body readers bind(SourceProvider.StreamSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.SaxSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.DomSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); /* * TODO: com.sun.jersey.core.impl.provider.entity.EntityHolderReader */ // Message body writers bind(StreamingOutputProvider.class).to(MessageBodyWriter.class).in(Singleton.class); bind(SourceProvider.SourceWriter.class).to(MessageBodyWriter.class).in(Singleton.class); install(new ServiceFinderBinder<HeaderDelegateProvider>(HeaderDelegateProvider.class, applicationProperties, runtimeType)); }
@Override protected void configure() { // Message body providers (both readers & writers) bindSingletonWorker(ByteArrayProvider.class); bindSingletonWorker(DataSourceProvider.class); bindSingletonWorker(FileProvider.class); bindSingletonWorker(FormMultivaluedMapProvider.class); bindSingletonWorker(FormProvider.class); bindSingletonWorker(InputStreamProvider.class); bindSingletonWorker(BasicTypesMessageProvider.class); bindSingletonWorker(ReaderProvider.class); bindSingletonWorker(RenderedImageProvider.class); bindSingletonWorker(StringMessageProvider.class); // Message body readers bind(SourceProvider.StreamSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.SaxSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); bind(SourceProvider.DomSourceReader.class).to(MessageBodyReader.class).in(Singleton.class); /* * TODO: com.sun.jersey.core.impl.provider.entity.EntityHolderReader */ // Message body writers bind(StreamingOutputProvider.class).to(MessageBodyWriter.class).in(Singleton.class); bind(SourceProvider.SourceWriter.class).to(MessageBodyWriter.class).in(Singleton.class); // Header Delegate Providers registered in META-INF.services install(new ServiceFinderBinder<>(HeaderDelegateProvider.class, applicationProperties, runtimeType)); }
@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); } }
private <T extends MessageBodyReader & MessageBodyWriter> void bindSingletonWorker(final Class<T> worker) { bind(worker).to(MessageBodyReader.class).to(MessageBodyWriter.class).in(Singleton.class); } }
private <T extends MessageBodyReader & MessageBodyWriter> void bindSingletonWorker(final Class<T> worker) { bind(worker).to(MessageBodyReader.class).to(MessageBodyWriter.class).in(Singleton.class); } }
private <T extends MessageBodyReader & MessageBodyWriter> void bindSingletonWorker(final Class<T> worker) { bind(worker).to(MessageBodyReader.class).to(MessageBodyWriter.class).in(Singleton.class); } }
private <T extends MessageBodyReader & MessageBodyWriter> void bindSingletonWorker(final Class<T> worker) { bind(worker).to(MessageBodyReader.class).to(MessageBodyWriter.class).in(Singleton.class); } }
private <T extends MessageBodyReader & MessageBodyWriter> void bindSingletonWorker(final Class<T> worker) { bind(worker).to(MessageBodyReader.class).to(MessageBodyWriter.class).in(Singleton.class); } }
injectionManager.register(new MessagingBinders.MessageBodyProviders(application.getProperties(), RuntimeType.SERVER));