Package jadex.extension.rs.publish
Class NanoHttpServletRequestWrapper
- java.lang.Object
- 
- jadex.extension.rs.publish.NanoHttpServletRequestWrapper
 
- 
- All Implemented Interfaces:
- javax.servlet.http.HttpServletRequest,- javax.servlet.ServletRequest
 
 public class NanoHttpServletRequestWrapper extends java.lang.Object implements javax.servlet.http.HttpServletRequestWrapper of HttpServletRequest for nano.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classNanoHttpServletRequestWrapper.DateHandlerstatic classNanoHttpServletRequestWrapper.NanoAsyncContextstatic classNanoHttpServletRequestWrapper.NanoHttpSessionstatic classNanoHttpServletRequestWrapper.NanoServletContexttodo: context values are just stored locally contexts are not cached but always
 - 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>attributesThe request attributes.protected NanoHttpServletRequestWrapper.NanoAsyncContextcontextThe async context.protected static java.util.Map<java.lang.String,NanoHttpServletRequestWrapper.NanoServletContext>contextsThe servlet contexts.static java.lang.StringHEADER_NANO_SESSIONIDHttp header for the session id.protected java.util.Map<java.lang.String,java.lang.String>headersThe header map (case insensitive).protected fi.iki.elonen.NanoHTTPD.IHTTPSessionnanosessionThe nano session.protected javax.servlet.http.HttpServletResponseresponseThe response (for async context).protected NanoHttpServletRequestWrapper.NanoHttpSessionsessionThe http session.
 - 
Constructor SummaryConstructors Constructor Description NanoHttpServletRequestWrapper(fi.iki.elonen.NanoHTTPD.IHTTPSession session, javax.servlet.http.HttpServletResponse response)Create a new wrapper.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticate(javax.servlet.http.HttpServletResponse response)java.lang.StringchangeSessionId()javax.servlet.AsyncContextgetAsyncContext()java.lang.ObjectgetAttribute(java.lang.String name)java.util.Enumeration<java.lang.String>getAttributeNames()java.lang.StringgetAuthType()java.lang.StringgetCharacterEncoding()intgetContentLength()longgetContentLengthLong()java.lang.StringgetContentType()java.lang.StringgetContextPath()javax.servlet.http.Cookie[]getCookies()longgetDateHeader(java.lang.String name)javax.servlet.DispatcherTypegetDispatcherType()java.lang.StringgetHeader(java.lang.String name)java.util.Enumeration<java.lang.String>getHeaderNames()protected java.util.Map<java.lang.String,java.lang.String>getHeaders()Get the header fields.java.util.Enumeration<java.lang.String>getHeaders(java.lang.String name)javax.servlet.ServletInputStreamgetInputStream()intgetIntHeader(java.lang.String name)java.lang.StringgetLocalAddr()java.util.LocalegetLocale()java.util.Enumeration<java.util.Locale>getLocales()java.lang.StringgetLocalName()intgetLocalPort()java.lang.StringgetMethod()java.lang.StringgetParameter(java.lang.String name)java.util.Map<java.lang.String,java.lang.String[]>getParameterMap()java.util.Enumeration<java.lang.String>getParameterNames()java.lang.String[]getParameterValues(java.lang.String name)javax.servlet.http.PartgetPart(java.lang.String name)java.util.Collection<javax.servlet.http.Part>getParts()java.lang.StringgetPathInfo()java.lang.StringgetPathTranslated()java.lang.StringgetProtocol()java.lang.StringgetQueryString()java.io.BufferedReadergetReader()java.lang.StringgetRealPath(java.lang.String path)java.lang.StringgetRemoteAddr()java.lang.StringgetRemoteHost()intgetRemotePort()java.lang.StringgetRemoteUser()javax.servlet.RequestDispatchergetRequestDispatcher(java.lang.String path)java.lang.StringgetRequestedSessionId()java.lang.StringgetRequestURI()java.lang.StringBuffergetRequestURL()java.lang.StringgetScheme()java.lang.StringgetServerName()intgetServerPort()javax.servlet.ServletContextgetServletContext()java.lang.StringgetServletPath()javax.servlet.http.HttpSessiongetSession()javax.servlet.http.HttpSessiongetSession(boolean create)java.security.PrincipalgetUserPrincipal()booleanisAsyncStarted()booleanisAsyncSupported()booleanisRequestedSessionIdFromCookie()booleanisRequestedSessionIdFromUrl()booleanisRequestedSessionIdFromURL()booleanisRequestedSessionIdValid()booleanisSecure()booleanisUserInRole(java.lang.String role)voidlogin(java.lang.String username, java.lang.String password)voidlogout()voidremoveAttribute(java.lang.String name)voidsetAttribute(java.lang.String name, java.lang.Object o)voidsetCharacterEncoding(java.lang.String env)javax.servlet.AsyncContextstartAsync()javax.servlet.AsyncContextstartAsync(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)<T extends javax.servlet.http.HttpUpgradeHandler>
 Tupgrade(java.lang.Class<T> handlerClass)
 
- 
- 
- 
Field Detail- 
HEADER_NANO_SESSIONIDpublic static final java.lang.String HEADER_NANO_SESSIONID Http header for the session id.- See Also:
- Constant Field Values
 
 - 
contextsprotected static java.util.Map<java.lang.String,NanoHttpServletRequestWrapper.NanoServletContext> contexts The servlet contexts.
 - 
nanosessionprotected fi.iki.elonen.NanoHTTPD.IHTTPSession nanosession The nano session.
 - 
attributesprotected java.util.Map<java.lang.String,java.lang.Object> attributes The request attributes.
 - 
contextprotected NanoHttpServletRequestWrapper.NanoAsyncContext context The async context.
 - 
responseprotected javax.servlet.http.HttpServletResponse response The response (for async context).
 - 
headersprotected java.util.Map<java.lang.String,java.lang.String> headers The header map (case insensitive).
 - 
sessionprotected NanoHttpServletRequestWrapper.NanoHttpSession session The http session.
 
- 
 - 
Method Detail- 
getHeadersprotected java.util.Map<java.lang.String,java.lang.String> getHeaders() Get the header fields.
 - 
getAttributepublic java.lang.Object getAttribute(java.lang.String name) - Specified by:
- getAttributein interface- javax.servlet.ServletRequest
 
 - 
getAttributeNamespublic java.util.Enumeration<java.lang.String> getAttributeNames() - Specified by:
- getAttributeNamesin interface- javax.servlet.ServletRequest
 
 - 
getCharacterEncodingpublic java.lang.String getCharacterEncoding() - Specified by:
- getCharacterEncodingin interface- javax.servlet.ServletRequest
 
 - 
setCharacterEncodingpublic void setCharacterEncoding(java.lang.String env) throws java.io.UnsupportedEncodingException- Specified by:
- setCharacterEncodingin interface- javax.servlet.ServletRequest
- Throws:
- java.io.UnsupportedEncodingException
 
 - 
getContentLengthpublic int getContentLength() - Specified by:
- getContentLengthin interface- javax.servlet.ServletRequest
 
 - 
getContentLengthLongpublic long getContentLengthLong() - Specified by:
- getContentLengthLongin interface- javax.servlet.ServletRequest
 
 - 
getContentTypepublic java.lang.String getContentType() - Specified by:
- getContentTypein interface- javax.servlet.ServletRequest
 
 - 
getInputStreampublic javax.servlet.ServletInputStream getInputStream() throws java.io.IOException- Specified by:
- getInputStreamin interface- javax.servlet.ServletRequest
- Throws:
- java.io.IOException
 
 - 
getParameterpublic java.lang.String getParameter(java.lang.String name) - Specified by:
- getParameterin interface- javax.servlet.ServletRequest
 
 - 
getParameterNamespublic java.util.Enumeration<java.lang.String> getParameterNames() - Specified by:
- getParameterNamesin interface- javax.servlet.ServletRequest
 
 - 
getParameterValuespublic java.lang.String[] getParameterValues(java.lang.String name) - Specified by:
- getParameterValuesin interface- javax.servlet.ServletRequest
 
 - 
getParameterMappublic java.util.Map<java.lang.String,java.lang.String[]> getParameterMap() - Specified by:
- getParameterMapin interface- javax.servlet.ServletRequest
 
 - 
getProtocolpublic java.lang.String getProtocol() - Specified by:
- getProtocolin interface- javax.servlet.ServletRequest
 
 - 
getSchemepublic java.lang.String getScheme() - Specified by:
- getSchemein interface- javax.servlet.ServletRequest
 
 - 
getServerNamepublic java.lang.String getServerName() - Specified by:
- getServerNamein interface- javax.servlet.ServletRequest
 
 - 
getServerPortpublic int getServerPort() - Specified by:
- getServerPortin interface- javax.servlet.ServletRequest
 
 - 
getReaderpublic java.io.BufferedReader getReader() throws java.io.IOException- Specified by:
- getReaderin interface- javax.servlet.ServletRequest
- Throws:
- java.io.IOException
 
 - 
getRemoteAddrpublic java.lang.String getRemoteAddr() - Specified by:
- getRemoteAddrin interface- javax.servlet.ServletRequest
 
 - 
getRemoteHostpublic java.lang.String getRemoteHost() - Specified by:
- getRemoteHostin interface- javax.servlet.ServletRequest
 
 - 
setAttributepublic void setAttribute(java.lang.String name, java.lang.Object o)- Specified by:
- setAttributein interface- javax.servlet.ServletRequest
 
 - 
removeAttributepublic void removeAttribute(java.lang.String name) - Specified by:
- removeAttributein interface- javax.servlet.ServletRequest
 
 - 
getLocalepublic java.util.Locale getLocale() - Specified by:
- getLocalein interface- javax.servlet.ServletRequest
 
 - 
getLocalespublic java.util.Enumeration<java.util.Locale> getLocales() - Specified by:
- getLocalesin interface- javax.servlet.ServletRequest
 
 - 
isSecurepublic boolean isSecure() - Specified by:
- isSecurein interface- javax.servlet.ServletRequest
 
 - 
getRequestDispatcherpublic javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path) - Specified by:
- getRequestDispatcherin interface- javax.servlet.ServletRequest
 
 - 
getRealPathpublic java.lang.String getRealPath(java.lang.String path) - Specified by:
- getRealPathin interface- javax.servlet.ServletRequest
 
 - 
getRemotePortpublic int getRemotePort() - Specified by:
- getRemotePortin interface- javax.servlet.ServletRequest
 
 - 
getLocalNamepublic java.lang.String getLocalName() - Specified by:
- getLocalNamein interface- javax.servlet.ServletRequest
 
 - 
getLocalAddrpublic java.lang.String getLocalAddr() - Specified by:
- getLocalAddrin interface- javax.servlet.ServletRequest
 
 - 
getLocalPortpublic int getLocalPort() - Specified by:
- getLocalPortin interface- javax.servlet.ServletRequest
 
 - 
getServletContextpublic javax.servlet.ServletContext getServletContext() - Specified by:
- getServletContextin interface- javax.servlet.ServletRequest
 
 - 
startAsyncpublic javax.servlet.AsyncContext startAsync() throws java.lang.IllegalStateException- Specified by:
- startAsyncin interface- javax.servlet.ServletRequest
- Throws:
- java.lang.IllegalStateException
 
 - 
startAsyncpublic javax.servlet.AsyncContext startAsync(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws java.lang.IllegalStateException- Specified by:
- startAsyncin interface- javax.servlet.ServletRequest
- Throws:
- java.lang.IllegalStateException
 
 - 
isAsyncStartedpublic boolean isAsyncStarted() - Specified by:
- isAsyncStartedin interface- javax.servlet.ServletRequest
 
 - 
isAsyncSupportedpublic boolean isAsyncSupported() - Specified by:
- isAsyncSupportedin interface- javax.servlet.ServletRequest
 
 - 
getAsyncContextpublic javax.servlet.AsyncContext getAsyncContext() - Specified by:
- getAsyncContextin interface- javax.servlet.ServletRequest
 
 - 
getDispatcherTypepublic javax.servlet.DispatcherType getDispatcherType() - Specified by:
- getDispatcherTypein interface- javax.servlet.ServletRequest
 
 - 
getAuthTypepublic java.lang.String getAuthType() - Specified by:
- getAuthTypein interface- javax.servlet.http.HttpServletRequest
 
 - 
getCookiespublic javax.servlet.http.Cookie[] getCookies() - Specified by:
- getCookiesin interface- javax.servlet.http.HttpServletRequest
 
 - 
getDateHeaderpublic long getDateHeader(java.lang.String name) - Specified by:
- getDateHeaderin interface- javax.servlet.http.HttpServletRequest
 
 - 
getHeaderpublic java.lang.String getHeader(java.lang.String name) - Specified by:
- getHeaderin interface- javax.servlet.http.HttpServletRequest
 
 - 
getHeaderspublic java.util.Enumeration<java.lang.String> getHeaders(java.lang.String name) - Specified by:
- getHeadersin interface- javax.servlet.http.HttpServletRequest
 
 - 
getHeaderNamespublic java.util.Enumeration<java.lang.String> getHeaderNames() - Specified by:
- getHeaderNamesin interface- javax.servlet.http.HttpServletRequest
 
 - 
getIntHeaderpublic int getIntHeader(java.lang.String name) - Specified by:
- getIntHeaderin interface- javax.servlet.http.HttpServletRequest
 
 - 
getMethodpublic java.lang.String getMethod() - Specified by:
- getMethodin interface- javax.servlet.http.HttpServletRequest
 
 - 
getPathInfopublic java.lang.String getPathInfo() - Specified by:
- getPathInfoin interface- javax.servlet.http.HttpServletRequest
 
 - 
getContextPathpublic java.lang.String getContextPath() - Specified by:
- getContextPathin interface- javax.servlet.http.HttpServletRequest
 
 - 
getQueryStringpublic java.lang.String getQueryString() - Specified by:
- getQueryStringin interface- javax.servlet.http.HttpServletRequest
 
 - 
getRemoteUserpublic java.lang.String getRemoteUser() - Specified by:
- getRemoteUserin interface- javax.servlet.http.HttpServletRequest
 
 - 
isUserInRolepublic boolean isUserInRole(java.lang.String role) - Specified by:
- isUserInRolein interface- javax.servlet.http.HttpServletRequest
 
 - 
getUserPrincipalpublic java.security.Principal getUserPrincipal() - Specified by:
- getUserPrincipalin interface- javax.servlet.http.HttpServletRequest
 
 - 
getRequestedSessionIdpublic java.lang.String getRequestedSessionId() - Specified by:
- getRequestedSessionIdin interface- javax.servlet.http.HttpServletRequest
 
 - 
getRequestURIpublic java.lang.String getRequestURI() - Specified by:
- getRequestURIin interface- javax.servlet.http.HttpServletRequest
 
 - 
getRequestURLpublic java.lang.StringBuffer getRequestURL() - Specified by:
- getRequestURLin interface- javax.servlet.http.HttpServletRequest
 
 - 
getServletPathpublic java.lang.String getServletPath() - Specified by:
- getServletPathin interface- javax.servlet.http.HttpServletRequest
 
 - 
getSessionpublic javax.servlet.http.HttpSession getSession(boolean create) - Specified by:
- getSessionin interface- javax.servlet.http.HttpServletRequest
 
 - 
getSessionpublic javax.servlet.http.HttpSession getSession() - Specified by:
- getSessionin interface- javax.servlet.http.HttpServletRequest
 
 - 
changeSessionIdpublic java.lang.String changeSessionId() - Specified by:
- changeSessionIdin interface- javax.servlet.http.HttpServletRequest
 
 - 
isRequestedSessionIdValidpublic boolean isRequestedSessionIdValid() - Specified by:
- isRequestedSessionIdValidin interface- javax.servlet.http.HttpServletRequest
 
 - 
isRequestedSessionIdFromCookiepublic boolean isRequestedSessionIdFromCookie() - Specified by:
- isRequestedSessionIdFromCookiein interface- javax.servlet.http.HttpServletRequest
 
 - 
isRequestedSessionIdFromURLpublic boolean isRequestedSessionIdFromURL() - Specified by:
- isRequestedSessionIdFromURLin interface- javax.servlet.http.HttpServletRequest
 
 - 
isRequestedSessionIdFromUrlpublic boolean isRequestedSessionIdFromUrl() - Specified by:
- isRequestedSessionIdFromUrlin interface- javax.servlet.http.HttpServletRequest
 
 - 
authenticatepublic boolean authenticate(javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException- Specified by:
- authenticatein interface- javax.servlet.http.HttpServletRequest
- Throws:
- java.io.IOException
- javax.servlet.ServletException
 
 - 
loginpublic void login(java.lang.String username, java.lang.String password) throws javax.servlet.ServletException- Specified by:
- loginin interface- javax.servlet.http.HttpServletRequest
- Throws:
- javax.servlet.ServletException
 
 - 
logoutpublic void logout() throws javax.servlet.ServletException- Specified by:
- logoutin interface- javax.servlet.http.HttpServletRequest
- Throws:
- javax.servlet.ServletException
 
 - 
getPartspublic java.util.Collection<javax.servlet.http.Part> getParts() throws java.io.IOException, javax.servlet.ServletException- Specified by:
- getPartsin interface- javax.servlet.http.HttpServletRequest
- Throws:
- java.io.IOException
- javax.servlet.ServletException
 
 - 
getPartpublic javax.servlet.http.Part getPart(java.lang.String name) throws java.io.IOException, javax.servlet.ServletException- Specified by:
- getPartin interface- javax.servlet.http.HttpServletRequest
- Throws:
- java.io.IOException
- javax.servlet.ServletException
 
 - 
upgradepublic <T extends javax.servlet.http.HttpUpgradeHandler> T upgrade(java.lang.Class<T> handlerClass) throws java.io.IOException, javax.servlet.ServletException- Specified by:
- upgradein interface- javax.servlet.http.HttpServletRequest
- Throws:
- java.io.IOException
- javax.servlet.ServletException
 
 - 
getPathTranslatedpublic java.lang.String getPathTranslated() - Specified by:
- getPathTranslatedin interface- javax.servlet.http.HttpServletRequest
 
 
- 
 
-