use of org.glassfish.jersey.servlet.internal.spi.RequestContextProvider in project jersey by jersey.
the class RequestResponseWrapperProvider method getRequestScopedInitializerProvider.
@Override
public RequestScopedInitializerProvider getRequestScopedInitializerProvider() {
return new RequestScopedInitializerProvider() {
@Override
public RequestScopedInitializer get(final RequestContextProvider context) {
return new RequestScopedInitializer() {
@Override
public void initialize(InjectionManager injectionManager) {
ServiceLocator locator = ((HK2InjectionManager) injectionManager).getServiceLocator();
locator.<Ref<HttpServletRequest>>getService(REQUEST_TYPE).set(finalWrap(context.getHttpServletRequest()));
locator.<Ref<HttpServletResponse>>getService(RESPONSE_TYPE).set(finalWrap(context.getHttpServletResponse()));
}
};
}
};
}
Aggregations