|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.ServletRequestWrapper
org.norther.tammi.spray.filter.chain.ServletRequestWrapper
org.norther.tammi.spray.filter.chain.HttpServletRequestWrapper
org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest
org.norther.tammi.spray.protocol.chain.BaseProtocolRequest
org.norther.tammi.spray.protocol.chain.HttpProtocolRequest
public class HttpProtocolRequest
A default implementation of the HTTP protocol request. It implements the
javax.servlet.http.HttpServletRequest interface by applying
methods provided by the javax.servlet.ServletRequest
implementation used as an adaptee.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest |
|---|
AbstractProtocolRequest.ProtocolRequestExtension |
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest |
|---|
BODY_PARSED, COOKIE_SESSION, HEADERS_PARSED, REQUEST_PARSED, URI_PARSED, URL_SESSION |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
HttpProtocolRequest()
Constructs a new request. |
|
HttpProtocolRequest(ServletRequest req)
Constructs a new request with a wrapped one. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the object after use. |
protected void |
drain()
Drains a HTTP/1.1 request to guarantee a fresh stream for the next round. |
void |
filtered(FilterChainEvent event)
Notifies the object that it has been activated within a filter chain. |
Object |
getAttribute(String name)
|
String |
getAuthType()
|
String |
getContextPath()
|
ServletInputStream |
getInputStream()
|
int |
getMaxRequestLength()
Gets the maximum allowed request length. |
protected Map |
getParsedHeaderMap()
Gets the parsed HTTP headers as a map of names and value vectors. |
protected Map |
getParsedParameterMap()
Gets the parsed parameters as a map of names and value arrays. |
protected List |
getParsedRequestList()
Gets the parsed request as a list of items. |
protected String |
getParsedRequestURI()
Gets the parsed request URI. |
String |
getPathInfo()
|
String |
getPathTranslated()
|
BufferedReader |
getReader()
|
String |
getRemoteAddr()
|
String |
getRemoteUser()
|
String |
getRequestedSessionId()
|
int |
getServerPort()
|
HttpSession |
getSession()
|
HttpSession |
getSession(boolean create)
|
Principal |
getUserPrincipal()
|
protected boolean |
isRedirection()
Checks whether this request is a redirection. |
boolean |
isRequestedSessionIdFromCookie()
|
boolean |
isRequestedSessionIdFromUrl()
|
boolean |
isRequestedSessionIdFromURL()
|
boolean |
isRequestedSessionIdValid()
|
boolean |
isSecure()
|
protected boolean |
isSecureSession()
Checks whether the session is secure. |
boolean |
isUserInRole(String role)
|
void |
setMaxRequestLength(int length)
Sets the maximum allowed request length. |
| Methods inherited from class org.norther.tammi.spray.protocol.chain.BaseProtocolRequest |
|---|
getCharacterEncoding, getContentLength, getContentType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getLocale, getLocales, getMethod, getProtocol, getQueryString, getRequestDispatcher, getRequestURI, getRequestURL, getServerName, getServletPath |
| Methods inherited from class org.norther.tammi.spray.protocol.chain.AbstractProtocolRequest |
|---|
addParameter, addParameter, addParameterMap, getAuthorityURL, getAuthorityURL, getAuthorityURL, getHttpFilter, getInternalCharacterEncoding, getParameter, getParameterMap, getParameterNames, getParameterValues, getPathTail, getRedirectionURL, getVersion, isAuthentication, removeParameter, setAuthentication, setParameter, setRedirection, setRedirectionURL |
| Methods inherited from class org.norther.tammi.spray.filter.chain.HttpServletRequestWrapper |
|---|
setRequest |
| Methods inherited from class org.norther.tammi.spray.filter.chain.ServletRequestWrapper |
|---|
completed, disposed, getExtension, getFilterChain, getFilteredRequest, getFilteredResponse, isDisposed, recycle, recycle, recycled, setExtension |
| Methods inherited from class javax.servlet.ServletRequestWrapper |
|---|
getAttributeNames, getLocalAddr, getLocalName, getLocalPort, getRealPath, getRemoteHost, getRemotePort, getRequest, getScheme, removeAttribute, setAttribute, setCharacterEncoding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.http.HttpServletRequest |
|---|
getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getQueryString, getRequestURI, getRequestURL, getServletPath |
| Methods inherited from interface javax.servlet.ServletRequest |
|---|
getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, removeAttribute, setAttribute, setCharacterEncoding |
| Constructor Detail |
|---|
public HttpProtocolRequest()
public HttpProtocolRequest(ServletRequest req)
req - the wrapped request.| Method Detail |
|---|
public void dispose()
Recyclable
dispose in interface Recyclabledispose in class BaseProtocolRequestpublic int getServerPort()
getServerPort in interface ServletRequestgetServerPort in class BaseProtocolRequestpublic String getRemoteAddr()
getRemoteAddr in interface ServletRequestgetRemoteAddr in class ServletRequestWrapperpublic boolean isSecure()
isSecure in interface ServletRequestisSecure in class ServletRequestWrapperpublic Object getAttribute(String name)
getAttribute in interface ServletRequestgetAttribute in class ServletRequestWrapper
public ServletInputStream getInputStream()
throws IOException
getInputStream in interface ServletRequestgetInputStream in class ServletRequestWrapperIOException
public BufferedReader getReader()
throws IOException
getReader in interface ServletRequestgetReader in class ServletRequestWrapperIOExceptionpublic String getContextPath()
getContextPath in interface HttpServletRequestgetContextPath in class HttpServletRequestWrapperpublic String getRequestedSessionId()
getRequestedSessionId in interface HttpServletRequestgetRequestedSessionId in class HttpServletRequestWrapperpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface HttpServletRequestisRequestedSessionIdFromCookie in class HttpServletRequestWrapperpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface HttpServletRequestisRequestedSessionIdFromUrl in class HttpServletRequestWrapperpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface HttpServletRequestisRequestedSessionIdFromURL in class HttpServletRequestWrapperpublic boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface HttpServletRequestisRequestedSessionIdValid in class HttpServletRequestWrapperpublic HttpSession getSession()
getSession in interface HttpServletRequestgetSession in class HttpServletRequestWrapperpublic HttpSession getSession(boolean create)
getSession in interface HttpServletRequestgetSession in class HttpServletRequestWrapperpublic String getPathInfo()
getPathInfo in interface HttpServletRequestgetPathInfo in class HttpServletRequestWrapperpublic String getPathTranslated()
getPathTranslated in interface HttpServletRequestgetPathTranslated in class HttpServletRequestWrapperpublic String getAuthType()
getAuthType in interface HttpServletRequestgetAuthType in class HttpServletRequestWrapperpublic String getRemoteUser()
getRemoteUser in interface HttpServletRequestgetRemoteUser in class HttpServletRequestWrapperpublic Principal getUserPrincipal()
getUserPrincipal in interface HttpServletRequestgetUserPrincipal in class HttpServletRequestWrapperpublic boolean isUserInRole(String role)
isUserInRole in interface HttpServletRequestisUserInRole in class HttpServletRequestWrapperpublic void filtered(FilterChainEvent event)
FilterChainListener
filtered in interface FilterChainListenerfiltered in class ServletRequestWrapperevent - the filter chain event.public int getMaxRequestLength()
public void setMaxRequestLength(int length)
length - the maximum request length.protected void drain()
AbstractProtocolRequest
drain in class AbstractProtocolRequestprotected boolean isRedirection()
AbstractProtocolRequest
isRedirection in class AbstractProtocolRequestprotected boolean isSecureSession()
AbstractProtocolRequest
isSecureSession in class AbstractProtocolRequestprotected List getParsedRequestList()
BaseProtocolRequest
getParsedRequestList in class BaseProtocolRequestprotected Map getParsedHeaderMap()
BaseProtocolRequest
getParsedHeaderMap in class BaseProtocolRequestprotected Map getParsedParameterMap()
AbstractProtocolRequest
getParsedParameterMap in class AbstractProtocolRequestprotected String getParsedRequestURI()
BaseProtocolRequest
getParsedRequestURI in class BaseProtocolRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||