public class AgreementResponseImpl extends Object implements AgreementResponse
Constructor and Description |
---|
AgreementResponseImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addCookie(String name,
String value)
Add a cookie to the response stream.
|
String |
getBasicAuthenticationRealm() |
String |
getCookie(String name)
Return a specific cookie.
|
Set |
getCookieNames()
Return the names of the cookies which agreements have requested to be set on the
response.
|
int |
getError()
Return the error code, or 0 for no error code
|
String |
getForward() |
String |
getHeader(String name)
Return a specific header.
|
Set |
getHeaderNames()
Return the names of the headers which agreements have requested to be set on the
response.
|
String |
getLocalRedirect() |
String |
getRedirect() |
Object |
getRequestAttribute(String name)
Return a specific request attribute which is to be placed in the request scope
|
Set |
getRequestAttributeNames()
return the names of the request attributes which an agreement has requested
to be set in the request scope.
|
Object |
getSessionAttribute(String name)
Return a specific Session attribute which is to be placed in the Session scope
|
Set |
getSessionAttributeNames()
return the names of the Session attributes which an agreement has requested
to be set in the Session scope.
|
int |
getStatus()
Return the error code, or 0 for no error code
|
void |
setBasicAuthenticationRealm(String realm)
Specify that the agreement requires HTTP authentication using the realm
realm . |
void |
setError(int code)
Send a specific error on the HTTP response.
|
void |
setForward(String URI)
Forward the request to a JSP or servlet, without using HTTP Redirects, but
rather, using
RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) . |
void |
setHeader(String name,
String value)
Specify that a header should be set using the given name and value.
|
void |
setLocalRedirect(String URI)
Redirect the response to a local (context relative) URI.
|
void |
setRedirect(String URL)
Redirect the response using HTTP 302 to a specific URL, as defined in the
HTTP RFC.
|
void |
setRequestAttribute(String name,
Object object)
Specify that an attribute be added to the request scope.
|
void |
setSessionAttribute(String name,
Object object)
Specify that an attribute be added to the session scope.
|
void |
setStatus(int code)
Set a specific status on the HTTP response.
|
public void setRedirect(String URL)
AgreementResponse
setRedirect
in interface AgreementResponse
public void setForward(String URI)
AgreementResponse
RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
.setForward
in interface AgreementResponse
public void setLocalRedirect(String URI)
AgreementResponse
setLocalRedirect
in interface AgreementResponse
URI
- The context relative path of the servlet, or JSP which will
handle the remainder of the request.public void setStatus(int code)
AgreementResponse
setStatus
in interface AgreementResponse
code
- The acutal status code (302, 304, and so on)public void setError(int code)
AgreementResponse
setError
in interface AgreementResponse
code
- The acutal error code (404, 403, and so on)public void setBasicAuthenticationRealm(String realm)
AgreementResponse
realm
.setBasicAuthenticationRealm
in interface AgreementResponse
realm
- The name of the realm in which to perform the loginpublic String getRedirect()
getRedirect
in interface AgreementResponse
public String getForward()
getForward
in interface AgreementResponse
public String getLocalRedirect()
getLocalRedirect
in interface AgreementResponse
public int getStatus()
AgreementResponse
getStatus
in interface AgreementResponse
public int getError()
AgreementResponse
getError
in interface AgreementResponse
public String getBasicAuthenticationRealm()
getBasicAuthenticationRealm
in interface AgreementResponse
public void addCookie(String name, String value)
AgreementResponse
addCookie
in interface AgreementResponse
name
- The name of the cookievalue
- The value of the cookiepublic String getCookie(String name)
AgreementResponse
getCookie
in interface AgreementResponse
name
- the name of the cookie to be retrievedpublic Set getCookieNames()
AgreementResponse
getCookieNames
in interface AgreementResponse
public void setHeader(String name, String value)
AgreementResponse
setHeader
in interface AgreementResponse
name
- The name of the headervalue
- The value of the headerpublic String getHeader(String name)
AgreementResponse
getHeader
in interface AgreementResponse
name
- the name of the header to be retrievedpublic Set getHeaderNames()
AgreementResponse
getHeaderNames
in interface AgreementResponse
public void setRequestAttribute(String name, Object object)
AgreementResponse
setRequestAttribute
in interface AgreementResponse
name
- The name of the request attributeobject
- The actual request attribute value.public Set getRequestAttributeNames()
AgreementResponse
getRequestAttributeNames
in interface AgreementResponse
public Object getRequestAttribute(String name)
AgreementResponse
getRequestAttribute
in interface AgreementResponse
name
- The name of the request attribute.public void setSessionAttribute(String name, Object object)
AgreementResponse
setSessionAttribute
in interface AgreementResponse
name
- The name of the session attributeobject
- The actual session attribute value.public Set getSessionAttributeNames()
AgreementResponse
getSessionAttributeNames
in interface AgreementResponse
public Object getSessionAttribute(String name)
AgreementResponse
getSessionAttribute
in interface AgreementResponse
name
- The name of the Session attribute.© 1998- 2018 Stibo DX