|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Defines an interface that normalizes a container-specific HTTP request into an HTTP container-independent form that can be used by a Cafesoft HttpAccessControlAgent.
| Method Summary | |
void |
addHeader(String name,
String value)
Adds the specified header and value to this HttpRequest. |
void |
destroy()
Destroy the CamsHttpAgentRequest. |
javax.servlet.http.Cookie[] |
getCookies(HttpCookieFilter filter)
Returns an array containing all of the Cookie objects the client sent with this request. |
String |
getHeader(String name)
Returns the value of the specified request header as a String. |
Enumeration |
getHeaderNames()
Returns an enumeration of all the header names this request contains. |
Enumeration |
getHeaders(String name)
Returns all the values of the specified request header as an Enumeration of String objects. |
String |
getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
String |
getParameter(String name)
Returns the value mapped to the specified parameter. |
Enumeration |
getParameterNames()
Returns all of the Http parameters. |
String |
getProtocol()
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
String |
getQueryString()
Returns the query string that is contained in the request URL after the path. |
String |
getRemoteAddr()
Returns the Internet Protocol (IP) address of the client that sent the request. |
String |
getRemoteHost()
Returns the fully qualified name of the client that sent the request. |
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. |
String |
getRequestURL()
Reconstructs the URL the client used to make the request. |
String |
getScheme()
Returns the name of the scheme used to make this request. |
String |
getServerAddr()
Returns the IP address of the server where the CamsHttpAgent is running. |
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. |
SessionId |
getSessionId()
Returns the session id if one exists. |
boolean |
isLogin()
Determines if this Http request is for logging in. |
boolean |
isLogout()
Determines if this Http request is for logging out. |
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
void |
log()
Logs the data contained in this CamsHttpAgentRequest. |
void |
recycle()
Recycle the CamsHttpAgentRequest for reuse. |
void |
setSessionId(SessionId sessionId)
Sets the session id. |
void |
validateHeaders()
Validate the request headers. |
| Method Detail |
public String getParameter(String name)
name - the name of the parameter
public Enumeration getParameterNames()
public void addHeader(String name,
String value)
name - the name of the headervalue - the value of the header
public void validateHeaders()
throws CamsHttpAgentException
CamsHttpAgentException - if any header name starts with the
prefix CAMS_. The message of the exception is the name of the
request header that was invalid.public String getRemoteAddr()
public String getRemoteHost()
public String getProtocol()
public String getScheme()
public String getServerName()
public String getServerAddr()
public int getServerPort()
public boolean isSecure()
public String getMethod()
public String getQueryString()
public String getRequestURI()
public String getRequestURL()
public javax.servlet.http.Cookie[] getCookies(HttpCookieFilter filter)
public String getHeader(String name)
name - a String specifying the header name.
public Enumeration getHeaders(String name)
Some headers, such as Accept-Language can be sent by clients as several headers each with a different value rather than sending the header as a comma separated list.
If the request did not include any headers of the specified name, this method returns an empty Enumeration. The header name is case insensitive. You can use this method with any request header.
name - a String specifying the header name
public Enumeration getHeaderNames()
public SessionId getSessionId()
public void setSessionId(SessionId sessionId)
sessionId - the session id or null if one is not setpublic boolean isLogin()
public boolean isLogout()
public void log()
public void recycle()
This method will return the CamsHttpAgentRequest object back to it's original creation state. That means any underlying collections should be cleared and not destroyed.
public void destroy()
This method will destroy the CamsHttpAgentRequest object. This method should be used when the CamsHttpAgentRequest will no longer be used. This method should destroy everything including underlying collections.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||