Package com.aspectran.web.adapter
Class HttpServletRequestAdapter
java.lang.Object
com.aspectran.core.activity.request.AbstractRequest
com.aspectran.core.adapter.AbstractRequestAdapter
com.aspectran.web.adapter.AbstractWebRequestAdapter
com.aspectran.web.adapter.HttpServletRequestAdapter
- All Implemented Interfaces:
RequestAdapter
,WebRequestAdapter
Adapt
HttpServletRequest
to Core RequestAdapter
.- Since:
- 2011. 3. 13.
-
Field Summary
Fields inherited from class com.aspectran.core.adapter.AbstractRequestAdapter
adaptee
-
Constructor Summary
ConstructorDescriptionHttpServletRequestAdapter
(MethodType requestMethod, jakarta.servlet.http.HttpServletRequest request) Instantiates a new HttpServletRequestAdapter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the character encoding used in the body of this request.Returns a map of the request headers that can be modified.void
preparse()
void
preparse
(WebRequestAdapter requestAdapter) void
setEncoding
(String encoding) Overrides the name of the character encoding used in the body of this request.Methods inherited from class com.aspectran.web.adapter.AbstractWebRequestAdapter
getBody, getBodyAsParameters, getMediaType, setMediaType
Methods inherited from class com.aspectran.core.adapter.AbstractRequestAdapter
getAdaptee, getRequestScope, hasRequestScope
Methods inherited from class com.aspectran.core.activity.request.AbstractRequest
addHeader, containsHeader, extractAttributes, extractParameters, getAllParameters, getAttribute, getAttributeMap, getAttributeNames, getBodyAsParameters, getFileParameter, getFileParameterMap, getFileParameterNames, getFileParameterValues, getHeader, getHeaderNames, getHeaderValues, getLocale, getMaxRequestSize, getParameter, getParameterMap, getParameterNames, getParameters, getParameters, getParameterValues, getRequestMethod, getTimeZone, hasAttributes, hasFileParameters, hasHeaders, hasParameters, putAllAttributes, putAllFileParameters, putAllParameters, putAllParameters, removeAttribute, removeFileParameter, setAttribute, setAttributeMap, setBody, setFileParameter, setFileParameter, setHeader, setHeaderMap, setLocale, setMaxRequestSize, setParameter, setParameter, setParameterMap, setTimeZone
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aspectran.core.adapter.RequestAdapter
addHeader, containsHeader, extractAttributes, extractParameters, getAdaptee, getAllParameters, getAttribute, getAttributeMap, getAttributeNames, getBodyAsParameters, getFileParameter, getFileParameterNames, getFileParameterValues, getHeader, getHeaderNames, getHeaderValues, getLocale, getMaxRequestSize, getParameter, getParameterMap, getParameterNames, getParameters, getParameters, getParameterValues, getRequestMethod, getRequestScope, getTimeZone, hasAttributes, hasFileParameters, hasHeaders, hasParameters, hasRequestScope, putAllAttributes, putAllFileParameters, putAllParameters, putAllParameters, removeAttribute, removeFileParameter, setAttribute, setBody, setFileParameter, setFileParameter, setHeader, setLocale, setMaxRequestSize, setParameter, setParameter, setTimeZone
-
Constructor Details
-
HttpServletRequestAdapter
public HttpServletRequestAdapter(MethodType requestMethod, jakarta.servlet.http.HttpServletRequest request) Instantiates a new HttpServletRequestAdapter.- Parameters:
requestMethod
- the request methodrequest
- the activity request wrapper
-
-
Method Details
-
getHeaderMap
Description copied from class:AbstractRequest
Returns a map of the request headers that can be modified. If not yet instantiated then create a new one.- Specified by:
getHeaderMap
in interfaceRequestAdapter
- Overrides:
getHeaderMap
in classAbstractRequest
- Returns:
- an
MultiValueMap
object, may not benull
-
getEncoding
Description copied from interface:RequestAdapter
Returns the name of the character encoding used in the body of this request.- Specified by:
getEncoding
in interfaceRequestAdapter
- Overrides:
getEncoding
in classAbstractRequest
- Returns:
- a
String
containing the name of the character encoding, ornull
if the request does not specify a character encoding
-
setEncoding
Description copied from interface:RequestAdapter
Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader(). Otherwise, it has no effect.- Specified by:
setEncoding
in interfaceRequestAdapter
- Overrides:
setEncoding
in classAbstractRequest
- Parameters:
encoding
- aString
containing the name of the character encoding.- Throws:
UnsupportedEncodingException
- if the specified encoding is invalid
-
getInputStream
- Specified by:
getInputStream
in interfaceRequestAdapter
- Overrides:
getInputStream
in classAbstractRequest
- Throws:
IOException
-
preparse
public void preparse() -
preparse
-