|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.cams.agent.http.AbstractCamsHttpAgentResponse
Abstract implementation of CamsHttpAgentResponse.
| Constructor Summary | |
AbstractCamsHttpAgentResponse()
Creates a new AAbstractCamsHttpAgentResponse. |
|
AbstractCamsHttpAgentResponse(javax.servlet.http.HttpServletResponse response,
CamsHttpAgentRequest request)
Creates a new AbstractCamsHttpAgentResponse with the specified response and request. |
|
| Method Summary | |
void |
addCookie(javax.servlet.http.Cookie cookie)
Adds the specified cookie to the response. |
void |
addHeader(String name,
String value)
Adds a response header with the given name and value. |
boolean |
containsHeader(String name)
Returns a boolean indicating whether the named response header has already been set. |
void |
destroy()
Destroy the CamsHttpAgentResponse. |
String |
getMessage()
Get a context sensitive response message. |
OutputStream |
getOutputStream()
Returns an output stream. |
RemoteSession |
getSession()
Returns the Cams session. |
String |
getSessionId()
Returns the Cams Session ID. |
CamsHttpAgentStatusCode |
getStatus()
Returns the status code for this response. |
void |
initialize(Config config)
Initializes this request. |
boolean |
isCommitted()
Return true if this response has been committed. |
void |
recycle()
Recycle the CamsHttpAgentResponse for reuse. |
void |
redirectToLoginPage(String camsLoginUrl,
Map queryParameters)
Redirects the user to the Cams login page. |
void |
sendRedirect(String location)
Sends a temporary redirect response to the client using the specified redirect location URL. |
void |
setAccessDenied(String message)
Set an access denied response status and a context-sensitive message. |
void |
setContentType(String contentType)
Sets the content type of this response. |
void |
setError(String message)
Set an error response status and a context-sensitive error message. |
void |
setHeader(String name,
String value)
Sets a response header with the given name and value. |
void |
setRequest(CamsHttpAgentRequest request)
Sets a new CamsHttpAgentRequest. |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets a new Catalina response. |
void |
setSession(RemoteSession session)
Sets the Cams session. |
void |
setSessionId(String sessionId)
Sets the Cams Session identifier. |
void |
setStatus(CamsHttpAgentStatusCode status)
Sets the status code for this response. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractCamsHttpAgentResponse()
public AbstractCamsHttpAgentResponse(javax.servlet.http.HttpServletResponse response,
CamsHttpAgentRequest request)
response - the Http responserequest - the Cams Http agent specific request
NullPointerException - thrown if either the response or request
are null| Method Detail |
public void setResponse(javax.servlet.http.HttpServletResponse response)
response - the Http responsepublic void setRequest(CamsHttpAgentRequest request)
request - contains Http data needed by the Cams CamsHttpAgentpublic void initialize(Config config)
config - contains configuration datapublic void addCookie(javax.servlet.http.Cookie cookie)
addCookie in interface CamsHttpAgentResponsecookie - the Cookie to return to the clientpublic boolean containsHeader(String name)
name - the header name
public void sendRedirect(String location)
sendRedirect in interface CamsHttpAgentResponselocation - the redirect location URL
public void setHeader(String name,
String value)
name - the name of the headervalue - the header valuecontainsHeader(java.lang.String),
addHeader(java.lang.String, java.lang.String)
public void addHeader(String name,
String value)
name - the name of the headervalue - the additional header valuesetHeader(java.lang.String, java.lang.String)public void setStatus(CamsHttpAgentStatusCode status)
setStatus in interface CamsHttpAgentResponsestatus - the new status codepublic CamsHttpAgentStatusCode getStatus()
getStatus in interface CamsHttpAgentResponsepublic void setError(String message)
setError in interface CamsHttpAgentResponsemessage - the error message.public void setAccessDenied(String message)
setAccessDenied in interface CamsHttpAgentResponsemessage - the access denied message.public String getMessage()
getMessage in interface CamsHttpAgentResponsepublic void setSessionId(String sessionId)
sessionId - the Cams Session ID associated with the HTTP client.public String getSessionId()
public void setSession(RemoteSession session)
setSession in interface CamsHttpAgentResponsesession - Contains information about a user that has logged into
Camspublic RemoteSession getSession()
getSession in interface CamsHttpAgentResponsepublic boolean isCommitted()
public OutputStream getOutputStream()
throws IOException
IOExceptionpublic void setContentType(String contentType)
setContentType in interface CamsHttpAgentResponsecontentType - the content type of this responsepublic void recycle()
CamsHttpAgentResponseThis method will return the CamsHttpAgentResponse object back to it's original creation state. That means any underlying collections should be cleared and not destroyed.
recycle in interface CamsHttpAgentResponsepublic void destroy()
This method will destroy the CamsHttpAgentResponse object. This method should be used when the CamsHttpAgentResponse will no longer be used. This method should destroy everything including underlying collections.
destroy in interface CamsHttpAgentResponse
public void redirectToLoginPage(String camsLoginUrl,
Map queryParameters)
redirectToLoginPage in interface CamsHttpAgentResponsecamsLoginUrl - the Url of the Cams login pagequeryParameters - a Map of query parameters to be appended to the
camsLoginUrl.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||