@Override protected void configure() { bindFactory(ReferencingFactory.<ApplicationInfo>referenceFactory()) .to(new GenericType<Ref<ApplicationInfo>>() { }) .in(Singleton.class); bindFactory(ApplicationInfoInjectionFactory.class) .to(ApplicationInfo.class); } });
@Override protected void configure() { bindFactory(ReferencingFactory.<ApplicationInfo>referenceFactory()) .to(new GenericType<Ref<ApplicationInfo>>() { }) .in(Singleton.class); bindFactory(ApplicationInfoInjectionFactory.class) .to(ApplicationInfo.class); } });
.to(new GenericType<Ref<HttpServletRequest>>() {}).in(RequestScoped.class); .proxy(true).proxyForSameScope(false).in(RequestScoped.class); bindFactory(ReferencingFactory.referenceFactory()) .to(new GenericType<Ref<HttpServletResponse>>() {}).in(RequestScoped.class); bindFactory(webConfig::getServletContext).to(ServletContext.class).in(Singleton.class); bindFactory(() -> servletConfig).to(ServletConfig.class).in(Singleton.class); bindFactory(webConfig::getFilterConfig).to(FilterConfig.class).in(Singleton.class); bindFactory(() -> webConfig).to(WebConfig.class).in(Singleton.class);
@Override protected void configure() { bindFactory(JettyRequestReferencingFactory.class).to(Request.class) .proxy(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Request>referenceFactory()).to(new GenericType<Ref<Request>>() {}) .in(RequestScoped.class); bindFactory(JettyResponseReferencingFactory.class).to(Response.class) .proxy(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Response>referenceFactory()).to(new GenericType<Ref<Response>>() {}) .in(RequestScoped.class); } }
.to(new GenericType<Ref<HttpServletRequest>>() {}).in(RequestScoped.class); .proxy(true).proxyForSameScope(false).in(RequestScoped.class); bindFactory(ReferencingFactory.referenceFactory()) .to(new GenericType<Ref<HttpServletResponse>>() {}).in(RequestScoped.class); bindFactory(webConfig::getServletContext).to(ServletContext.class).in(Singleton.class); bindFactory(() -> servletConfig).to(ServletConfig.class).in(Singleton.class); bindFactory(webConfig::getFilterConfig).to(FilterConfig.class).in(Singleton.class); bindFactory(() -> webConfig).to(WebConfig.class).in(Singleton.class);
@Override protected void configure() { bindFactory(GrizzlyRequestReferencingFactory.class).to(Request.class) .proxy(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Request>referenceFactory()).to(new GenericType<Ref<Request>>() {}) .in(RequestScoped.class); bindFactory(GrizzlyResponseReferencingFactory.class).to(Response.class) .proxy(true).proxyForSameScope(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Response>referenceFactory()).to(new GenericType<Ref<Response>>() {}) .in(RequestScoped.class); } }
@Override protected void configure() { bindFactory(ReferencingFactory.<MonitoringStatistics>referenceFactory()) .to(new GenericType<Ref<MonitoringStatistics>>() { }) .in(Singleton.class); bindFactory(StatisticsInjectionFactory.class).to(MonitoringStatistics.class); bind(StatisticsListener.class).to(MonitoringStatisticsListener.class).in(Singleton.class); } });
@Override protected void configure() { bindFactory(ReferencingFactory.<MonitoringStatistics>referenceFactory()) .to(new GenericType<Ref<MonitoringStatistics>>() { }) .in(Singleton.class); bindFactory(StatisticsInjectionFactory.class).to(MonitoringStatistics.class); bind(StatisticsListener.class).to(MonitoringStatisticsListener.class).in(Singleton.class); } });
@Override protected void configure() { bindFactory(SimpleRequestReferencingFactory.class).to(Request.class).proxy(true) .proxyForSameScope(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Request>referenceFactory()) .to(new GenericType<Ref<Request>>() { }).in(RequestScoped.class); bindFactory(SimpleResponseReferencingFactory.class).to(Response.class).proxy(true) .proxyForSameScope(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Response>referenceFactory()) .to(new GenericType<Ref<Response>>() { }).in(RequestScoped.class); } }
@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); } }
@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); } }
@Override protected void configure() { bindFactory(WebServerRequestReferencingFactory.class).to(ServerRequest.class) .proxy(false) .in(RequestScoped.class); bindFactory(ReferencingFactory.<ServerRequest>referenceFactory()).to(new GenericType<Ref<ServerRequest>>() { }) .in(RequestScoped.class); bindFactory(WebServerResponseReferencingFactory.class).to(ServerResponse.class) .proxy(true).proxyForSameScope(false) .in(RequestScoped.class); bindFactory(ReferencingFactory.<ServerResponse>referenceFactory()).to(new GenericType<Ref<ServerResponse>>() { }) .in(RequestScoped.class); bindFactory(SpanReferencingFactory.class).to(Span.class) .proxy(false) .in(RequestScoped.class).named(JerseySupport.REQUEST_SPAN_QUALIFIER); bindFactory(SpanContextReferencingFactory.class).to(SpanContext.class) .proxy(false) .in(RequestScoped.class).named(JerseySupport.REQUEST_SPAN_CONTEXT); bindFactory(ReferencingFactory.<Span>referenceFactory()).to(new GenericType<Ref<Span>>() { }) .in(RequestScoped.class); bindFactory(ReferencingFactory.<SpanContext>referenceFactory()).to(new GenericType<Ref<SpanContext>>() { }) .in(RequestScoped.class); }
@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); } }
@Override protected void configure() { bindFactory(SecurityContextRefFactory.class) .to(SecurityContext.class) .proxy(true) .proxyForSameScope(false) .in(RequestScoped.class); bindFactory(ReferencingFactory.<SecurityContext>referenceFactory()) .to(new GenericType<Ref<SecurityContext>>() { }) .in(RequestScoped.class); bind(security).to(Security.class); bind(featureConfig).to(FeatureConfig.class); } });
@Override protected void configure() { bindFactory(ReferencingFactory.<ApplicationInfo>referenceFactory()) .to(new GenericType<Ref<ApplicationInfo>>() { }) .in(Singleton.class); bindFactory(ApplicationInfoInjectionFactory.class) .to(ApplicationInfo.class); } });
@Override protected void configure() { bindFactory(ReferencingFactory.<MonitoringStatistics>referenceFactory()) .to(new GenericType<Ref<MonitoringStatistics>>() { }) .in(Singleton.class); bindFactory(StatisticsInjectionFactory.class).to(MonitoringStatistics.class); bind(StatisticsListener.class).to(MonitoringStatisticsListener.class).in(Singleton.class); } });
@Override protected void configure() { for (InstanceFactoryDefinition<?> factory : factoryDefinitions) { bindFactory(factory.getInstanceFactory()).to(factory.getType()).in(factory.getScope()); } } /**
@Override protected void configure() { bindFactory(GrizzlyRequestReferencingFactory.class).to(Request.class) .proxy(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Request>referenceFactory()).to(new GenericType<Ref<Request>>() {}) .in(RequestScoped.class); bindFactory(GrizzlyResponseReferencingFactory.class).to(Response.class) .proxy(true).proxyForSameScope(false).in(RequestScoped.class); bindFactory(ReferencingFactory.<Response>referenceFactory()).to(new GenericType<Ref<Response>>() {}) .in(RequestScoped.class); } }