|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CamsHttpAgentRequest
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 |
addSessionId(SessionId sessionId)
Add a SessionId to the request. |
boolean |
containsCamsHeaders()
Determine if the CamsHttpAgentRequest contains CAMS HTTP Headers. |
void |
destroy()
Destroy the CamsHttpAgentRequest. |
X509Certificate[] |
getClientX509CertificateChain()
Get the client X509 certificate chain. |
javax.servlet.http.Cookie |
getCookie(String name)
Get a Cookie with the given name. |
javax.servlet.http.Cookie[] |
getCookies(com.cafesoft.core.http.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 |
getSecurityDomain()
Get the name of the SecurityDomain handling 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(String securityDomain)
Get a SecurityDomain specific SessionId. |
SessionId[] |
getSessionIds()
Get all of the request's SessionIds. |
String |
getValueByPropertySpec(PropertySpec propertySpec)
Get an HTTP request value by PropertySpec. |
boolean |
isAESO()
Determines if this Http request is for automatic enterprise sign-on (AESO). |
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. |
boolean |
isSSO()
Determines if this Http request is for cross DNS domain single sign-on. |
void |
log()
Logs the data contained in this CamsHttpAgentRequest. |
void |
recycle()
Recycle the CamsHttpAgentRequest for reuse. |
void |
removeSessionId(SessionId sessionId)
Remove a Sessionid from the request. |
void |
setSecurityDomain(String securityDomain)
Set the name of the SecurityDomain handling this request. |
void |
validateHeaders()
Validate the request headers. |
| Method Detail |
|---|
String getParameter(String name)
name - the name of the parameter
Enumeration getParameterNames()
void addHeader(String name,
String value)
name - the name of the headervalue - the value of the header
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.boolean containsCamsHeaders()
String getRemoteAddr()
String getRemoteHost()
String getProtocol()
String getScheme()
String getServerName()
String getServerAddr()
int getServerPort()
boolean isSecure()
String getMethod()
String getQueryString()
String getRequestURI()
String getRequestURL()
javax.servlet.http.Cookie getCookie(String name)
name - the name of the Cookie to get.
javax.servlet.http.Cookie[] getCookies(com.cafesoft.core.http.HttpCookieFilter filter)
String getHeader(String name)
name - a String specifying the header name.
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
Enumeration getHeaderNames()
X509Certificate[] getClientX509CertificateChain()
String getSecurityDomain()
void setSecurityDomain(String securityDomain)
securityDomain - the name of the SecurityDomain handling this
request.void addSessionId(SessionId sessionId)
sessionId - the SessionId to add to the request.void removeSessionId(SessionId sessionId)
sessionId - the SessionId to remove from the request.SessionId[] getSessionIds()
SessionId getSessionId(String securityDomain)
securityDomain - the name of the SecurityDomain from which the
SessionId is being requested from.
String getValueByPropertySpec(PropertySpec propertySpec)
throws CamsHttpAgentException
propSpec - the PropertySpec.
CamsHttpAgentException - if an error occurs resolving the PropertySpec
to a value.boolean isLogin()
boolean isLogout()
boolean isSSO()
boolean isAESO()
void log()
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.
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 | |||||||||