public class MPHttpServletRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
Constructor and Description |
---|
MPHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request)
Constructs the wrapper with an HttpServletRequest.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent()
Returns the request content in bytes.
|
int |
getContentLength()
Returns the length of the HTTP request content.
|
java.lang.String |
getContentType() |
java.lang.Object |
getContext()
Returns the message context of the request that need to
be available for processing the response (or fault).
|
ExchangeStatus |
getExchangeStatus()
Returns the action to take on the request.
|
java.lang.String |
getHeader(java.lang.String name) |
java.util.Enumeration |
getHeaders(java.lang.String name) |
javax.servlet.ServletInputStream |
getInputStream()
Returns a ServletInputStream for streaming in the request.
|
java.io.BufferedReader |
getReader()
Returns a BufferedReader for reading the servlet request.
|
int |
getRemotePort() |
void |
resetStream()
Resets the stream of the request so that the content can be re-read
from the beginning using either a ServletInputStream or BufferedReader.
|
void |
setContent(byte[] content)
Changes the HTTP content of the request.
|
void |
setContentType(java.lang.String contentType) |
void |
setContext(java.lang.Object context)
Changes the message context of the request.
|
void |
setExchangeStatus(ExchangeStatus status)
Changes the action to take on the request.
|
void |
setInputStream(java.io.InputStream istrm) |
java.lang.String |
toString() |
getAuthType, getContextPath, getCookies, getDateHeader, getHeaderNames, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
getAttribute, getAttributeNames, getCharacterEncoding, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute, getAttributeNames, getCharacterEncoding, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
public MPHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest to wrap.public javax.servlet.ServletInputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.servlet.ServletRequest
getInputStream
in class javax.servlet.ServletRequestWrapper
java.io.IOException
- thrown if unable to create the input stream.public void setInputStream(java.io.InputStream istrm)
public java.lang.String getHeader(java.lang.String name)
getHeader
in interface javax.servlet.http.HttpServletRequest
getHeader
in class javax.servlet.http.HttpServletRequestWrapper
public java.util.Enumeration getHeaders(java.lang.String name)
getHeaders
in interface javax.servlet.http.HttpServletRequest
getHeaders
in class javax.servlet.http.HttpServletRequestWrapper
public java.io.BufferedReader getReader() throws java.io.IOException
getReader
in interface javax.servlet.ServletRequest
getReader
in class javax.servlet.ServletRequestWrapper
java.io.IOException
- thrown if unable to create the reader.public void setContent(byte[] content) throws java.io.IOException
content
- New HTTP content of the request in bytes.java.io.IOException
- Thrown if unable to change the content.public byte[] getContent() throws java.io.IOException
java.io.IOException
- Thrown if unable to return the content.public int getContentLength()
getContentLength
in interface javax.servlet.ServletRequest
getContentLength
in class javax.servlet.ServletRequestWrapper
public ExchangeStatus getExchangeStatus()
public void setExchangeStatus(ExchangeStatus status)
action
- FilterAction to take.public java.lang.Object getContext()
public void setContext(java.lang.Object context)
context
- Object representing the message context.public void resetStream() throws java.io.IOException
java.io.IOException
- Thrown if unable to close an open stream.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getContentType()
getContentType
in interface javax.servlet.ServletRequest
getContentType
in class javax.servlet.ServletRequestWrapper
public void setContentType(java.lang.String contentType)
public int getRemotePort()
getRemotePort
in interface javax.servlet.ServletRequest
getRemotePort
in class javax.servlet.ServletRequestWrapper
Akana, Inc. Copyright (C) 2000-2015, All rights reserved
This software is the confidential and proprietary information of Akana, Inc. and is subject to copyright protection under laws of the United States of America and other countries. The use of this software should be in accordance with the license agreement terms you entered into with Akana, Inc.