
httpServletRequestX.HttpServletRequestX Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of HttpServletRequestX Show documentation
Show all versions of HttpServletRequestX Show documentation
Extension for HttpServletRequest. Easy accessing for request accept header.
The newest version!
package httpServletRequestX;
import httpServletRequestX.accept.header.AcceptHeader;
import httpServletRequestX.accept.header.AcceptHeaderImpl;
import httpServletRequestX.inject.GuiceModule;
import javax.servlet.http.HttpServletRequest;
import com.google.inject.Guice;
import com.google.inject.Injector;
/**
* This library wraps the {@link HttpServletRequest} and provides a set of convenience functions to handle the accept
* content type options.
*
* @author Marco Reinwarth
*/
public class HttpServletRequestX extends HttpServletRequestXWrapper {
private static Injector injector;
private static AcceptHeader ACCEPT_HEADER;
/**
* Guice injection preparations
*/
static {
injector = Guice.createInjector(new GuiceModule());
ACCEPT_HEADER = injector.getInstance(AcceptHeaderImpl.class);
}
/**
* Base constructor that consumes the {@link HttpServletRequest} object
*
* @param request the {@link HttpServletRequest} object that has to be wrapped
*/
public HttpServletRequestX(final HttpServletRequest request) {
super(request, ACCEPT_HEADER);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy