RequestAdapterpublic class HttpServletRequestAdapter extends AbstractRequestAdapter
lockeradaptee| Constructor | Description |
|---|---|
HttpServletRequestAdapter(javax.servlet.http.HttpServletRequest request) |
Instantiates a new HttpServletRequestAdapter.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
fillAllAttributes(java.util.Map<java.lang.String,java.lang.Object> targetAttributes) |
Fills all attributes to the specified map.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllAttributes() |
Returns an unmodifiable map of the attributes.
|
<T> T |
getAttribute(java.lang.String name) |
Returns the value of the named attribute as a given type,
or
null if no attribute of the given name exists. |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
Returns an
Enumeration containing the
names of the attributes available to this request. |
java.lang.String |
getEncoding() |
Returns the name of the character encoding used in the body of this request.
|
java.util.Locale |
getLocale() |
Returns the preferred
Locale. |
void |
putAllAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes) |
Copies all of the mappings from the specified attributes.
|
void |
removeAttribute(java.lang.String name) |
Removes an attribute from this request.
|
void |
setAttribute(java.lang.String name,
java.lang.Object o) |
Stores an attribute in this request.
|
void |
setEncoding(java.lang.String encoding) |
Overrides the name of the character encoding used in the body of this request.
|
protected MultiValueMap<java.lang.String,java.lang.String> |
touchHeaders() |
Returns a map of the request headers that can be modified.
|
addHeader, containsHeader, copyAllParameters, fillAllParameters, getAllHeaders, getAllParameters, getFileParameter, getFileParameterNames, getFileParameterValues, getHeader, getHeaderNames, getHeaders, getParameter, getParameterNames, getParameterValues, getRequestMethod, getTimeZone, isHeadersInstantiated, isMaxLengthExceeded, removeFileParameter, setFileParameter, setFileParameter, setHeader, setLocale, setMaxLengthExceeded, setParameter, setParameter, setRequestMethod, setTimeZonegetAdaptee, getRequestScope, getRequestScopeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddHeader, containsHeader, copyAllParameters, fillAllParameters, getAllHeaders, getAllParameters, getFileParameter, getFileParameterNames, getFileParameterValues, getHeader, getHeaderNames, getHeaders, getParameter, getParameterNames, getParameterValues, getRequestMethod, getTimeZone, isMaxLengthExceeded, removeFileParameter, setFileParameter, setFileParameter, setHeader, setLocale, setMaxLengthExceeded, setParameter, setParameter, setTimeZonepublic HttpServletRequestAdapter(javax.servlet.http.HttpServletRequest request)
request - the HTTP requestpublic java.lang.String getEncoding()
RequestAdapterString containing the name of the character encoding,
or null if the request does not specify a character encodingpublic void setEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
RequestAdapterencoding - a String containing the name of the character encoding.java.io.UnsupportedEncodingException - if the specified encoding is invalidprotected MultiValueMap<java.lang.String,java.lang.String> touchHeaders()
AbstractRequesttouchHeaders in class AbstractRequestMultiValueMap object, may not be nullpublic <T> T getAttribute(java.lang.String name)
RequestAdapternull if no attribute of the given name exists.getAttribute in interface RequestAdaptergetAttribute in class AbstractRequestT - the generic typename - a String specifying the name of the attributeObject containing the value of the attribute,
or null if the attribute does not existpublic void setAttribute(java.lang.String name,
java.lang.Object o)
RequestAdaptersetAttribute in interface RequestAdaptersetAttribute in class AbstractRequestname - specifying the name of the attributeo - the Object to be storedpublic java.util.Enumeration<java.lang.String> getAttributeNames()
RequestAdapterEnumeration containing the
names of the attributes available to this request.
This method returns an empty Enumeration
if the request has no attributes available to it.getAttributeNames in interface RequestAdaptergetAttributeNames in class AbstractRequestpublic void removeAttribute(java.lang.String name)
RequestAdapterremoveAttribute in interface RequestAdapterremoveAttribute in class AbstractRequestname - a String specifying the name of the attribute to removepublic java.util.Map<java.lang.String,java.lang.Object> getAllAttributes()
AbstractRequestgetAllAttributes in interface RequestAdaptergetAllAttributes in class AbstractRequestpublic void putAllAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
AbstractRequestputAllAttributes in interface RequestAdapterputAllAttributes in class AbstractRequestattributes - the specified attributespublic void fillAllAttributes(java.util.Map<java.lang.String,java.lang.Object> targetAttributes)
RequestAdapterfillAllAttributes in interface RequestAdapterfillAllAttributes in class AbstractRequesttargetAttributes - the target attribute map to be filledpublic java.util.Locale getLocale()
RequestAdapterLocale.getLocale in interface RequestAdaptergetLocale in class AbstractRequestLocaleCopyright © 2008–2017 The Aspectran Project. All rights reserved.