|
||||||||||
| 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
public abstract class AbstractProtocolRequest
An abstract protocol request implementing the ProtocolExtension interface as an inner class and extended parameter methods.
| Nested Class Summary | |
|---|---|
protected class |
AbstractProtocolRequest.ProtocolRequestExtension
The protocol extension class. |
| Field Summary | |
|---|---|
protected static int |
BODY_PARSED
The body parsed mask. |
protected static int |
COOKIE_SESSION
The cookie session mask. |
protected static int |
HEADERS_PARSED
The headers parsed mask. |
protected static int |
REQUEST_PARSED
The request parsed mask. |
protected static int |
URI_PARSED
The URI parsed mask. |
protected static int |
URL_SESSION
The URL parsed mask. |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
|---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
|---|---|
AbstractProtocolRequest()
Constructs a new request. |
|
AbstractProtocolRequest(ServletRequest req)
Constructs a new request with a wrapped one. |
|
| Method Summary | |
|---|---|
protected void |
addParameter(String key,
String value)
Adds a parameter value to the parameter map. |
protected void |
addParameter(String key,
String[] values)
Adds parameter values to the parameter map. |
protected void |
addParameterMap(Map map)
Adds a parameter map to the parameter map. |
void |
dispose()
Disposes the object after use. |
protected abstract void |
drain()
Drains a HTTP/1.1 request to guarantee a fresh stream for the next round. |
protected StringBuilder |
getAuthorityURL()
Gets the authority URL of the request including the scheme, server name and port. |
protected StringBuilder |
getAuthorityURL(boolean secure)
Gets the authority URL of the request including the scheme, server name and port. |
protected StringBuilder |
getAuthorityURL(String host,
int port,
boolean secure)
Gets the authority URL of the request including the scheme, server name and port. |
protected HttpFilter |
getHttpFilter()
Gets the HTTP filter. |
protected String |
getInternalCharacterEncoding()
Gets the internal character encoding of the request. |
String |
getParameter(String name)
|
Map |
getParameterMap()
|
Enumeration |
getParameterNames()
|
String[] |
getParameterValues(String name)
|
protected Map |
getParsedParameterMap()
Gets the parsed parameters as a map of names and value arrays. |
protected String |
getPathTail()
Gets the tail of the path info. |
protected String |
getRedirectionURL()
Gets the redirection URL of this request. |
protected float |
getVersion()
Gets the protocol version of the request. |
protected boolean |
isAuthentication()
Checks whether the request is an authentication. |
protected boolean |
isRedirection()
Checks whether this request is a redirection. |
protected boolean |
isSecureSession()
Checks whether the session is secure. |
protected void |
removeParameter(String key)
Removes parameter values from the parameter map. |
protected void |
setAuthentication(boolean flag)
Sets whether the request is an authentication. |
protected void |
setParameter(String key,
String[] values)
Sets parameter values to the parameter map. |
protected void |
setRedirection(boolean flag)
Sets whether this request is a redirection. |
protected void |
setRedirectionURL(String url)
Sets the redirection URL of this request. |
| Methods inherited from class org.norther.tammi.spray.filter.chain.HttpServletRequestWrapper |
|---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, setRequest |
| Methods inherited from class org.norther.tammi.spray.filter.chain.ServletRequestWrapper |
|---|
completed, disposed, filtered, getExtension, getFilterChain, getFilteredRequest, getFilteredResponse, isDisposed, recycle, recycle, recycled, setExtension |
| Methods inherited from class javax.servlet.ServletRequestWrapper |
|---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, 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.ServletRequest |
|---|
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
| Field Detail |
|---|
protected static final int REQUEST_PARSED
protected static final int HEADERS_PARSED
protected static final int BODY_PARSED
protected static final int URI_PARSED
protected static final int URL_SESSION
protected static final int COOKIE_SESSION
| Constructor Detail |
|---|
public AbstractProtocolRequest()
public AbstractProtocolRequest(ServletRequest req)
req - the wrapped request.| Method Detail |
|---|
public void dispose()
Recyclable
dispose in interface Recyclabledispose in class HttpServletRequestWrapperpublic String getParameter(String name)
getParameter in interface ServletRequestgetParameter in class ServletRequestWrapperpublic String[] getParameterValues(String name)
getParameterValues in interface ServletRequestgetParameterValues in class ServletRequestWrapperpublic Enumeration getParameterNames()
getParameterNames in interface ServletRequestgetParameterNames in class ServletRequestWrapperpublic Map getParameterMap()
getParameterMap in interface ServletRequestgetParameterMap in class ServletRequestWrapperprotected abstract void drain()
protected float getVersion()
protected String getPathTail()
protected boolean isRedirection()
protected void setRedirection(boolean flag)
flag - true if a redirection, otherwise false.protected boolean isAuthentication()
protected void setAuthentication(boolean flag)
flag - true if an authentication, otherwise false.protected String getRedirectionURL()
protected void setRedirectionURL(String url)
url - the redirection URL.protected boolean isSecureSession()
protected StringBuilder getAuthorityURL()
protected StringBuilder getAuthorityURL(boolean secure)
secure - a flag to use https scheme.
protected StringBuilder getAuthorityURL(String host,
int port,
boolean secure)
host - the server name to use (null = default).port - the port number to use (0 = default).secure - a flag to use https scheme.
protected String getInternalCharacterEncoding()
protected void addParameter(String key,
String value)
key - the parameter key.value - the parameter value.
protected void addParameter(String key,
String[] values)
key - the parameter key.values - the parameter values.
protected void setParameter(String key,
String[] values)
key - the parameter key.values - the parameter values.protected void removeParameter(String key)
key - the parameter key.protected void addParameterMap(Map map)
map - the parameter map.protected Map getParsedParameterMap()
protected HttpFilter getHttpFilter()
IllegalStateException - if not available.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||