|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.web.XPRequest
public class XPRequest
For Servlet 2.3 systems the class will use 2.3 methods and assume UTF-8 character set.
For Servlet 2.2 systems it is more complicated. Servlet 2.2 engines by default
will convert the body to Unicode with a default character set (most are hard
coded to 8859-1). This creates a problem because in some character sets, it is
not possible to get the original bytes back once converted to Unicode.
NOTE: Only use XPRequest with UTF-8 incoming character sets.
Field Summary | |
---|---|
static java.lang.String |
HTTPGet
Plublic Constant for GET Request. |
Constructor Summary | |
---|---|
XPRequest(HttpServletRequest request)
interface to provide request information for HTTP servlets. |
|
XPRequest(HttpServletRequest request,
boolean bConsumeAndParsePostdata)
Only the gateway should call this constructor and will pass false for bConsumeAndParsePostdata Normally XPRequest constructor calls "ParseRequest()" method to provide the same behaviour on both Java and .NET platforms. |
Method Summary | |
---|---|
void |
ClearUnderlyingObject()
This method clears all the instance variable to avoid memory leak. |
java.lang.Object |
GetAttribute(java.lang.String name)
Returns the value of the named attribute as an Object, or null if no attribute of the given name exists. |
java.lang.String |
GetAuthType()
Returns the name of the authentication scheme used to protect the servlet. |
java.lang.String |
GetBasicAuthPassword()
Get the basic authentication password. |
java.lang.String |
GetBasicAuthUserName()
Get the basic authentication user name. |
byte[] |
GetBytes()
MES- GetBytes allows a client to retrieve the uploaded data as a byte array. |
java.lang.String |
GetClientAddress()
Returns the IP address of the client as a String in dotted quad form. |
java.lang.String |
GetCompletePath()
This method returns full name of the saved uploaded file. |
int |
GetContentLength()
Returns the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known. |
java.lang.String |
GetContentType()
Returns the MIME type of the body of the request, or null if the type is not known. |
XPCookie[] |
GetCookies()
Returns an array containing all of the Cookie objects the client sent with this request. |
java.lang.String |
GetHeader(java.lang.String name)
Returns the value of the specified request header as a String. |
IXPEnumerator |
GetHeaderNames()
Returns an enumeration of all the header names this request contains. |
XPInputStream |
GetInputStream()
Retrieves the body of the request as binary data using a ServletInputStream. |
IXPEnumerator |
GetLocales()
Returns an Enumeration of Locale objects indicating, in decreasing order starting with the preferred locale, the locales that are acceptable to the client based on the Accept-Language header. |
java.lang.String |
GetMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
IXPEnumerator |
GetParameterNames()
Returns an Enumeration of String objects containing the names of the parameters contained in this request. |
java.lang.String |
GetParameterValue(java.lang.String name)
Returns the value of a request parameter as a String, or null if the parameter does not exist. |
java.lang.String[] |
GetParameterValues(java.lang.String name)
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist. |
java.lang.String |
GetQueryString()
Returns the query string that is contained in the request URL after the path. |
java.lang.String |
GetRemoteFilePath()
This method returns full name of the last file in the uploaded file list. |
java.lang.String |
GetRemoteUser()
This method returns the authenticated remote user name. |
java.lang.String |
GetRequestedSessionId()
Returns the session ID specified by the client. |
java.lang.String |
GetRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. |
java.lang.String |
GetRequestURL()
Returns the URL the client used to make the request, using information in the HttpServletRequest object. |
java.lang.String |
GetScheme()
Returns the name of the scheme used to make this request, for example, http, https, or ftp. |
java.lang.String |
GetServerName()
Returns the host name of the server that received the request. |
int |
GetServerPort()
Returns the port number on which this request was received. |
java.lang.String |
GetServerVariable(java.lang.String name)
Deprecated. This method is deprecated, because it will always behave differently in Java and .NET |
IXPEnumerator |
GetServerVariableNames()
Deprecated. This method is deprecated, because it will always behave differently in Java and .NET |
XPSession |
GetSession()
Returns the current HttpSession associated with this request wrapped in XPSession, or if the request does not have a session, creates one. |
HttpServletRequest |
GetUnderlyingObject()
Returns underlying HttpServletRequest object. |
boolean |
IsSecureConnection()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
void |
ParseRequest()
This method is a helper method to parse the request body. |
void |
Save(java.lang.String _sFilePath)
This method only saves the last file in the uploaded files list. |
void |
SetAttribute(java.lang.String name,
java.lang.Object _value)
Stores an attribute in this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HTTPGet
Constructor Detail |
---|
public XPRequest(HttpServletRequest request, boolean bConsumeAndParsePostdata)
request
- HttpServletRequest to be wrapped into XPRequest.bConsumeAndParsePostdata
- flag that indicates to consume and parse post data.public XPRequest(HttpServletRequest request)
request
- HttpServletRequest to be wrapped into XPRequest.Method Detail |
---|
public java.lang.String GetBasicAuthPassword()
GetBasicAuthPassword
in interface IXPRequest
public java.lang.String GetBasicAuthUserName()
GetBasicAuthUserName
in interface IXPRequest
public java.lang.String GetRemoteUser()
GetRemoteUser
in interface IXPRequest
public byte[] GetBytes()
GetBytes
in interface IXPRequest
public java.lang.String GetCompletePath()
GetCompletePath
in interface IXPRequest
public java.lang.String GetRemoteFilePath()
GetRemoteFilePath
in interface IXPRequest
public void Save(java.lang.String _sFilePath)
Save
in interface IXPRequest
_sFilePath
- Path of the upload file.public int GetContentLength()
GetContentLength
in interface IXPRequest
public java.lang.String GetContentType()
GetContentType
in interface IXPRequest
public XPInputStream GetInputStream()
GetInputStream
in interface IXPRequest
public XPCookie[] GetCookies()
GetCookies
in interface IXPRequest
public java.lang.String GetHeader(java.lang.String name)
GetHeader
in interface IXPRequest
name
- request header.
public IXPEnumerator GetHeaderNames()
GetHeaderNames
in interface IXPRequest
public IXPEnumerator GetLocales()
GetLocales
in interface IXPRequest
public java.lang.String GetMethod()
GetMethod
in interface IXPRequest
public IXPEnumerator GetParameterNames()
GetParameterNames
in interface IXPRequest
public java.lang.String GetParameterValue(java.lang.String name)
GetParameterValue
in interface IXPRequest
name
- request parameter.
public java.lang.String[] GetParameterValues(java.lang.String name)
GetParameterValues
in interface IXPRequest
name
- request parameter.
public boolean IsSecureConnection()
IsSecureConnection
in interface IXPRequest
public java.lang.String GetScheme()
GetScheme
in interface IXPRequest
public java.lang.String GetServerName()
GetServerName
in interface IXPRequest
public int GetServerPort()
GetServerPort
in interface IXPRequest
public java.lang.String GetServerVariable(java.lang.String name)
GetServerVariable
in interface IXPRequest
name
- named attribute.
public IXPEnumerator GetServerVariableNames()
GetServerVariableNames
in interface IXPRequest
public java.lang.String GetQueryString()
GetQueryString
in interface IXPRequest
public java.lang.String GetRequestedSessionId()
GetRequestedSessionId
in interface IXPRequest
public java.lang.String GetRequestURI()
GetRequestURI
in interface IXPRequest
public java.lang.String GetRequestURL()
GetRequestURL
in interface IXPRequest
public XPSession GetSession()
GetSession
in interface IXPRequest
public java.lang.String GetAuthType()
GetAuthType
in interface IXPRequest
public java.lang.Object GetAttribute(java.lang.String name)
GetAttribute
in interface IXPRequest
name
- Name of the Attribute.
public void SetAttribute(java.lang.String name, java.lang.Object _value)
SetAttribute
in interface IXPRequest
name
- Name of the Attribute._value
- The Value Object of the Attribute.public HttpServletRequest GetUnderlyingObject()
public void ClearUnderlyingObject()
ClearUnderlyingObject
in interface IXPRequest
public void ParseRequest()
ParseRequest
in interface IXPRequest
java.io.IOException
- if it can't parse the request.public java.lang.String GetClientAddress()
GetClientAddress
in interface IXPRequest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |