org.opensaml.ws.soap.client
Class HTTPSOAPTransport.PostMethodHttpOutTransport

java.lang.Object
  extended by org.opensaml.ws.soap.client.HTTPSOAPTransport.PostMethodHttpOutTransport
All Implemented Interfaces:
HTTPOutTransport, HTTPTransport, OutTransport, Transport
Enclosing class:
HTTPSOAPTransport

protected class HTTPSOAPTransport.PostMethodHttpOutTransport
extends Object
implements HTTPOutTransport

Adapts an Apache Commons HTTPClient PostMethod into an HTTPOutTransport.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.opensaml.ws.transport.http.HTTPTransport
HTTPTransport.HTTP_VERSION
 
Constructor Summary
HTTPSOAPTransport.PostMethodHttpOutTransport(org.apache.commons.httpclient.methods.PostMethod method)
          Constructor.
 
Method Summary
 void addParameter(String name, String value)
          Sets the given parameter with the given value. This method is not supported for this transport implementation.
 Object getAttribute(String name)
          Gets a transport-specific attribute. This method is not supported for this transport implementation.
 String getCharacterEncoding()
          Gets the character encoding of the transport. This method is not supported for this transport implementation.
 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.
 org.opensaml.xml.security.credential.Credential getLocalCredential()
          Gets the local credential used to authenticate to the peer. This method is not supported for this transport implementation.
 OutputStream getOutgoingStream()
          Gets the outgoing data stream to the peer. This method is not supported for this transport implementation.
 String getParameterValue(String name)
          Gets the first value of the named parameter.
 List<String> getParameterValues(String name)
          Gets the values of the named parameter.
 org.opensaml.xml.security.credential.Credential getPeerCredential()
          Gets the credential offered by the peer to authenticate itself. This method is not supported for this transport implementation.
 int getStatusCode()
          Gets the status code of the request. This method is not supported for this transport implementation.
 HTTPTransport.HTTP_VERSION getVersion()
          Gets the HTTP version used to receive the message.
 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. This method is not supported for this transport implementation.
 void setAttribute(String name, Object value)
          Sets a transport-specific attribute. This method is not supported for this transport implementation.
 void setAuthenticated(boolean isAuthenticated)
          Sets whether the peer is authenticated. This method is not supported for this transport implementation.
 void setCharacterEncoding(String encoding)
          Sets the character encoding of the transport. This method is not supported for this transport implementation.
 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. This method is not supported for this transport implementation.
 void setVersion(HTTPTransport.HTTP_VERSION version)
          Sets the HTTP version to use for outgoing messages. This method is not supported for this transport implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPSOAPTransport.PostMethodHttpOutTransport

public HTTPSOAPTransport.PostMethodHttpOutTransport(org.apache.commons.httpclient.methods.PostMethod method)
Constructor.

Parameters:
method - post method used to send the request
Method Detail

sendRedirect

public void sendRedirect(String location)
Sends an HTTP 3XX redirect message back to the client. This method is not supported for this transport implementation.

Specified by:
sendRedirect in interface HTTPOutTransport
Parameters:
location - location to redirect the client to

setHeader

public void setHeader(String name,
                      String value)
Sets the given header with the given value.

Specified by:
setHeader in interface HTTPOutTransport
Parameters:
name - header name
value - header value

addParameter

public void addParameter(String name,
                         String value)
Sets the given parameter with the given value. This method is not supported for this transport implementation.

Specified by:
addParameter in interface HTTPOutTransport
Parameters:
name - parameter name
value - parameter value

setStatusCode

public void setStatusCode(int code)
Sets the status code for this transport. This method is not supported for this transport implementation.

Specified by:
setStatusCode in interface HTTPOutTransport
Parameters:
code - status code for this transport

setVersion

public void setVersion(HTTPTransport.HTTP_VERSION version)
Sets the HTTP version to use for outgoing messages. This method is not supported for this transport implementation.

Specified by:
setVersion in interface HTTPOutTransport
Parameters:
version - HTTP version to use for outgoing messages

getOutgoingStream

public OutputStream getOutgoingStream()
Gets the outgoing data stream to the peer. This method is not supported for this transport implementation.

Specified by:
getOutgoingStream in interface OutTransport
Returns:
outgoing data stream to the peer

setAttribute

public void setAttribute(String name,
                         Object value)
Sets a transport-specific attribute. This method is not supported for this transport implementation.

Specified by:
setAttribute in interface OutTransport
Parameters:
name - attribute name
value - attribute value

setCharacterEncoding

public void setCharacterEncoding(String encoding)
Sets the character encoding of the transport. This method is not supported for this transport implementation.

Specified by:
setCharacterEncoding in interface OutTransport
Parameters:
encoding - character encoding of the transport

getAttribute

public Object getAttribute(String name)
Gets a transport-specific attribute. This method is not supported for this transport implementation.

Specified by:
getAttribute in interface Transport
Parameters:
name - name of the attribute
Returns:
attribute value

getCharacterEncoding

public String getCharacterEncoding()
Gets the character encoding of the transport. This method is not supported for this transport implementation.

Specified by:
getCharacterEncoding in interface Transport
Returns:
character encoding of the transport

getLocalCredential

public org.opensaml.xml.security.credential.Credential getLocalCredential()
Gets the local credential used to authenticate to the peer. This method is not supported for this transport implementation.

Specified by:
getLocalCredential in interface Transport
Returns:
local credential used to authenticate to the peer

getPeerCredential

public org.opensaml.xml.security.credential.Credential getPeerCredential()
Gets the credential offered by the peer to authenticate itself. This method is not supported for this transport implementation.

Specified by:
getPeerCredential in interface Transport
Returns:
credential offered by the peer to authenticate itself

isAuthenticated

public boolean isAuthenticated()
Gets whether the peer is authenticated.

Specified by:
isAuthenticated in interface Transport
Returns:
whether the peer is authenticated

isConfidential

public boolean isConfidential()
Gets whether the transport represents a confidential connection (e.g. an SSL connection).

Specified by:
isConfidential in interface Transport
Returns:
whether the transport represents a confidential connection

setAuthenticated

public void setAuthenticated(boolean isAuthenticated)
Sets whether the peer is authenticated. This method is not supported for this transport implementation.

Specified by:
setAuthenticated in interface Transport
Parameters:
isAuthenticated - whether the peer is authenticated

setConfidential

public void setConfidential(boolean isConfidential)
Sets whether the transport represents a confidential connection.

Specified by:
setConfidential in interface Transport
Parameters:
isConfidential - whether the transport represents a confidential connection

getHTTPMethod

public String getHTTPMethod()
Gets the HTTP method (POST, GET, etc) used.

Specified by:
getHTTPMethod in interface HTTPTransport
Returns:
HTTP method used

getHeaderValue

public String getHeaderValue(String name)
Gets the first value of the header with the given name.

Specified by:
getHeaderValue in interface HTTPTransport
Parameters:
name - header name
Returns:
first value of the header with the given name, or null

getParameterValue

public String getParameterValue(String name)
Gets the first value of the named parameter. If the request is GET, this is a decoded URL parameter. If the request is POST-based, it is a parameter from the POST body.

Specified by:
getParameterValue in interface HTTPTransport
Parameters:
name - parameter name
Returns:
parameter value

getParameterValues

public List<String> getParameterValues(String name)
Gets the values of the named parameter. If the request is GET, this is a decoded URL parameter. If the request is POST-based, it is a parameter from the POST body.

Specified by:
getParameterValues in interface HTTPTransport
Parameters:
name - parameter name
Returns:
parameter values

getStatusCode

public int getStatusCode()
Gets the status code of the request. This method is not supported for this transport implementation.

Specified by:
getStatusCode in interface HTTPTransport
Returns:
status code of the request

getVersion

public HTTPTransport.HTTP_VERSION getVersion()
Gets the HTTP version used to receive the message.

Specified by:
getVersion in interface HTTPTransport
Returns:
HTTP version used to receive the message

isIntegrityProtected

public boolean isIntegrityProtected()
Gets whether the transport represents a connection that protects the integrity of transported content.

Specified by:
isIntegrityProtected in interface Transport
Returns:
whether the transport represents a connection that protects the integrity of transported content

setIntegrityProtected

public void setIntegrityProtected(boolean isIntegrityProtected)
Sets whether the transport represents a connection that protects the integrity of transported content.

Specified by:
setIntegrityProtected in interface Transport
Parameters:
isIntegrityProtected - whether the transport represents a connection that protects the integrity of transported content


Copyright © 2006-2008 Internet2. All Rights Reserved.