public class MPHttpServletRequestWrapper
extends HttpServletRequestWrapper
Constructor and Description |
---|
MPHttpServletRequestWrapper(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) |
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() |
public MPHttpServletRequestWrapper(HttpServletRequest request)
request
- HttpServletRequest to wrap.public ServletInputStream getInputStream() throws java.io.IOException
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)
public java.util.Enumeration getHeaders(java.lang.String name)
public java.io.BufferedReader getReader() throws java.io.IOException
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()
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()
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
public int getRemotePort()
?? 2022 Perforce Software, All rights reserved
This software is the confidential and proprietary information of Perforce, 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 Perforce, Inc.