|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.ws.transport.http.HttpServletResponseAdapter
public class HttpServletResponseAdapter
Adapts an HttpServletResponse to an HTTPOutTransport.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opensaml.ws.transport.http.HTTPTransport |
|---|
HTTPTransport.HTTP_VERSION |
| Field Summary | |
|---|---|
private javax.servlet.http.HttpServletResponse |
httpServletResponse
Adapted servlet response. |
private org.slf4j.Logger |
log
Class logger. |
private boolean |
peerAuthenticated
Whether the peer endpoint has been authenticated. |
private boolean |
secure
Whether the HTTP connection is over SSL/TLS. |
| Constructor Summary | |
|---|---|
HttpServletResponseAdapter(javax.servlet.http.HttpServletResponse response,
boolean isSecure)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addParameter(String name,
String value)
Sets the given parameter with the given value. |
Object |
getAttribute(String name)
Gets a transport-specific attribute. |
String |
getCharacterEncoding()
Gets the character encoding of the transport. |
String |
getHeaderValue(String name)
Gets the first value of the header with the given name. |
String |
getHTTPMethod()
Gets the HTTP method (POST, GET, etc) used. |
Credential |
getLocalCredential()
Gets the local credential used to authenticate to the peer. |
OutputStream |
getOutgoingStream()
Gets the outgoing data stream to the peer. |
String |
getParameterValue(String name)
Gets the first value of the named parameter. |
List<String> |
getParameterValues(String name)
Gets the values of the named parameter. |
Credential |
getPeerCredential()
Gets the credential offered by the peer to authenticate itself. |
int |
getStatusCode()
Gets the status code of the request. |
HTTPTransport.HTTP_VERSION |
getVersion()
Gets the HTTP version used to receive the message. |
javax.servlet.http.HttpServletResponse |
getWrappedResponse()
Gets the adapted response. |
boolean |
isAuthenticated()
Gets whether the peer is authenticated. |
boolean |
isConfidential()
Gets whether the transport represents a confidential connection (e.g. |
boolean |
isIntegrityProtected()
Gets whether the transport represents a connection that protects the integrity of transported content. |
void |
sendRedirect(String location)
Sends an HTTP 3XX redirect message back to the client. |
void |
setAttribute(String name,
Object value)
Sets a transport-specific attribute. |
void |
setAuthenticated(boolean isAuthenticated)
Sets whether the peer is authenticated. |
void |
setCharacterEncoding(String encoding)
Sets the character encoding of the transport. |
void |
setConfidential(boolean isConfidential)
Sets whether the transport represents a confidential connection. |
void |
setHeader(String name,
String value)
Sets the given header with the given value. |
void |
setIntegrityProtected(boolean isIntegrityProtected)
Sets whether the transport represents a connection that protects the integrity of transported content. |
void |
setStatusCode(int code)
Sets the status code for this transport. |
void |
setVersion(HTTPTransport.HTTP_VERSION version)
Sets the HTTP version to use for outgoing messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.servlet.http.HttpServletResponse httpServletResponse
private final org.slf4j.Logger log
private boolean peerAuthenticated
private boolean secure
| Constructor Detail |
|---|
public HttpServletResponseAdapter(javax.servlet.http.HttpServletResponse response,
boolean isSecure)
response - servlet response to adaptisSecure - whether the outbound connection is protected by SSL/TLS| Method Detail |
|---|
public Object getAttribute(String name)
getAttribute in interface Transportname - name of the attribute
public String getCharacterEncoding()
getCharacterEncoding in interface Transportpublic String getHeaderValue(String name)
getHeaderValue in interface HTTPTransportname - header name
public String getHTTPMethod()
getHTTPMethod in interface HTTPTransportpublic Credential getLocalCredential()
getLocalCredential in interface Transportpublic OutputStream getOutgoingStream()
getOutgoingStream in interface OutTransportpublic String getParameterValue(String name)
getParameterValue in interface HTTPTransportname - parameter name
public List<String> getParameterValues(String name)
getParameterValues in interface HTTPTransportname - parameter name
public Credential getPeerCredential()
getPeerCredential in interface Transportpublic int getStatusCode()
getStatusCode in interface HTTPTransportpublic HTTPTransport.HTTP_VERSION getVersion()
getVersion in interface HTTPTransportpublic javax.servlet.http.HttpServletResponse getWrappedResponse()
public boolean isAuthenticated()
isAuthenticated in interface Transportpublic boolean isConfidential()
isConfidential in interface Transportpublic void sendRedirect(String location)
sendRedirect in interface HTTPOutTransportlocation - location to redirect the client to
public void setAttribute(String name,
Object value)
setAttribute in interface OutTransportname - attribute namevalue - attribute valuepublic void setAuthenticated(boolean isAuthenticated)
setAuthenticated in interface TransportisAuthenticated - whether the peer is authenticatedpublic void setCharacterEncoding(String encoding)
setCharacterEncoding in interface OutTransportencoding - character encoding of the transportpublic void setConfidential(boolean isConfidential)
setConfidential in interface TransportisConfidential - whether the transport represents a confidential connection
public void setHeader(String name,
String value)
setHeader in interface HTTPOutTransportname - header namevalue - header value
public void addParameter(String name,
String value)
addParameter in interface HTTPOutTransportname - parameter namevalue - parameter valuepublic void setStatusCode(int code)
setStatusCode in interface HTTPOutTransportcode - status code for this transportpublic void setVersion(HTTPTransport.HTTP_VERSION version)
setVersion in interface HTTPOutTransportversion - HTTP version to use for outgoing messagespublic boolean isIntegrityProtected()
isIntegrityProtected in interface Transportpublic void setIntegrityProtected(boolean isIntegrityProtected)
setIntegrityProtected in interface TransportisIntegrityProtected - whether the transport represents a connection that protects the integrity of
transported content
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||