com.iplanet.trustbase.initiator.transport
Class XURLTransportAdapter

java.lang.Object
  |
  +--com.iplanet.trustbase.initiator.transport.XURLTransportAdapter
All Implemented Interfaces:
TransportAdapter

public class XURLTransportAdapter
extends java.lang.Object
implements TransportAdapter

XURLTransportAdapter provides a XURL based implementation of TransportAdapter using the XURL classes to provide the transportQ

See Also:
, TransportAdapterException, ConfigAdapterException, ExceptionCodes, TransportAdapter, ConfigAdapter, ExceptionCodes

Constructor Summary
XURLTransportAdapter(ConfigAdapter configAdapter)
          Construct a XURLTransportAdapter
 
Method Summary
 byte[] sendReceive(byte[] data, java.lang.String location, java.lang.String messageType)
          Send and receive the message data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XURLTransportAdapter

public XURLTransportAdapter(ConfigAdapter configAdapter)
Construct a XURLTransportAdapter
Parameters:
configAdapter - the config adapter to use The config information used is summarised below
PropertyDescription
<messageType>.http.mimeType The mime type to use for the given message type
Method Detail

sendReceive

public byte[] sendReceive(byte[] data,
                          java.lang.String location,
                          java.lang.String messageType)
                   throws TransportAdapterException,
                          ConfigAdapterException
Send and receive the message data
Specified by:
sendReceive in interface TransportAdapter
Parameters:
data - the data to be sent
location - the responder URL
messageType - the type of the message data (e.g. "ocsp");
Returns:
the data that was returned from the responder
Throws:
TransportAdapterException - on any transport error
ConfigAdapterException - if config information cannot be retrieved Exception codes generated in this class are as follows:
Code Arguments Description
csc-http-noMimeType String:location,String:messageType No mime type was registered for this message type
csc-http-malformedURL String:location Location string not a valid URL
csc-http-writeFailed String:location The data could not be sent
csc-http-readFailed String:location The data could not be read
csc-http-openConnectionFailed String:location A connection to the remote host could not be opened
csc-http-connectFailed String:location A connection to the remote host could not be opened
csc-http-noRouteToHost String:location No route to the remote host could be determined
csc-http-protocolError String:location There was a protocol error
csc-http-socketError String:location There was a general network error
csc-http-unknownHost String:location The remote host could not be found