public class HttpServletResponseAdapter extends Object implements HTTPOutTransport
HttpServletResponse
to an HTTPOutTransport
.HTTPTransport.HTTP_VERSION
コンストラクタと説明 |
---|
HttpServletResponseAdapter(javax.servlet.http.HttpServletResponse response,
boolean isSecure)
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
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. an SSL connection).
|
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.
|
public HttpServletResponseAdapter(javax.servlet.http.HttpServletResponse response, boolean isSecure)
response
- servlet response to adaptisSecure
- whether the outbound connection is protected by SSL/TLSpublic Object getAttribute(String name)
getAttribute
インタフェース内 Transport
name
- name of the attributepublic String getCharacterEncoding()
getCharacterEncoding
インタフェース内 Transport
public String getHeaderValue(String name)
getHeaderValue
インタフェース内 HTTPTransport
name
- header namepublic String getHTTPMethod()
getHTTPMethod
インタフェース内 HTTPTransport
public Credential getLocalCredential()
getLocalCredential
インタフェース内 Transport
public OutputStream getOutgoingStream()
getOutgoingStream
インタフェース内 OutTransport
public String getParameterValue(String name)
getParameterValue
インタフェース内 HTTPTransport
name
- parameter namepublic List<String> getParameterValues(String name)
getParameterValues
インタフェース内 HTTPTransport
name
- parameter namepublic Credential getPeerCredential()
getPeerCredential
インタフェース内 Transport
public int getStatusCode()
getStatusCode
インタフェース内 HTTPTransport
public HTTPTransport.HTTP_VERSION getVersion()
getVersion
インタフェース内 HTTPTransport
public javax.servlet.http.HttpServletResponse getWrappedResponse()
public boolean isAuthenticated()
isAuthenticated
インタフェース内 Transport
public boolean isConfidential()
isConfidential
インタフェース内 Transport
public void sendRedirect(String location)
sendRedirect
インタフェース内 HTTPOutTransport
location
- location to redirect the client topublic void setAttribute(String name, Object value)
setAttribute
インタフェース内 OutTransport
name
- attribute namevalue
- attribute valuepublic void setAuthenticated(boolean isAuthenticated)
setAuthenticated
インタフェース内 Transport
isAuthenticated
- whether the peer is authenticatedpublic void setCharacterEncoding(String encoding)
setCharacterEncoding
インタフェース内 OutTransport
encoding
- character encoding of the transportpublic void setConfidential(boolean isConfidential)
setConfidential
インタフェース内 Transport
isConfidential
- whether the transport represents a confidential connectionpublic void setHeader(String name, String value)
setHeader
インタフェース内 HTTPOutTransport
name
- header namevalue
- header valuepublic void addParameter(String name, String value)
addParameter
インタフェース内 HTTPOutTransport
name
- parameter namevalue
- parameter valuepublic void setStatusCode(int code)
setStatusCode
インタフェース内 HTTPOutTransport
code
- status code for this transportpublic void setVersion(HTTPTransport.HTTP_VERSION version)
setVersion
インタフェース内 HTTPOutTransport
version
- HTTP version to use for outgoing messagespublic boolean isIntegrityProtected()
isIntegrityProtected
インタフェース内 Transport
public void setIntegrityProtected(boolean isIntegrityProtected)
setIntegrityProtected
インタフェース内 Transport
isIntegrityProtected
- whether the transport represents a connection that protects the integrity of
transported contentCopyright © 2012. All Rights Reserved.