com.atomikos.icatch.msg
Class HttpTransport

java.lang.Object
  extended by com.atomikos.icatch.msg.AbstractTransport
      extended by com.atomikos.icatch.msg.HttpTransport
All Implemented Interfaces:
RecoverableResource, Transport
Direct Known Subclasses:
AtomikosHttpTransport, WsatHttpTransport

public class HttpTransport
extends AbstractTransport

A transport for HTTP.


Field Summary
static String CONTEXT_ROOT
          The context root of this transport.
 
Fields inherited from interface com.atomikos.icatch.msg.Transport
FTP, HTTP, JMS, SMTP, UNKNOWN_PROTOCOL
 
Constructor Summary
HttpTransport(String name, String participantLocalAddress, String coordinatorLocalAddress, int commitProtocol, int transportProtocol, int format, long defaultTimeout)
          Creates a new instance.
 
Method Summary
protected  String createURL(String localPath)
           
static int getPort()
           
static String getServerIpAddress()
           
static void initialize(String serverIp, int portNumber, boolean useSecureHttp)
          Initializes the HttpTransport class; should be called before the first instance is constructed.
 void replyReceived(TransactionMessage msg)
          Notification that a reply has come in.
 void requestReceived(TransactionMessage msg)
          Notification that a request has come in.
static boolean useSecureHttp()
           
 
Methods inherited from class com.atomikos.icatch.msg.AbstractTransport
close, createCommitMessage, createErrorMessage, createForgetMessage, createPreparedMessage, createPrepareMessage, createPrepareMessage, createRegisteredMessage, createRegisterMessage, createReplayMessage, createRollbackMessage, createStateMessage, endRecovery, getCommitProtocol, getCoordinatorAddress, getDefaultTimeout, getFormat, getName, getParticipantAddress, getTransportProtocol, isClosed, isSameRM, recover, registerMessageListener, registerMessageListener, removeMessageListener, send, sendAndReceive, setRecoveryService, setSenderPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_ROOT

public static final String CONTEXT_ROOT
The context root of this transport.

See Also:
Constant Field Values
Constructor Detail

HttpTransport

public HttpTransport(String name,
                     String participantLocalAddress,
                     String coordinatorLocalAddress,
                     int commitProtocol,
                     int transportProtocol,
                     int format,
                     long defaultTimeout)
Creates a new instance.

Parameters:
name -
participantLocalAddress -
coordinatorLocalAddress -
commitProtocol -
transportProtocol -
format -
defaultTimeout -
Method Detail

initialize

public static void initialize(String serverIp,
                              int portNumber,
                              boolean useSecureHttp)
Initializes the HttpTransport class; should be called before the first instance is constructed.

Parameters:
serverIp -
portNumber -
useSecureHttp -

getPort

public static int getPort()

getServerIpAddress

public static String getServerIpAddress()

useSecureHttp

public static boolean useSecureHttp()

createURL

protected String createURL(String localPath)

requestReceived

public void requestReceived(TransactionMessage msg)
Description copied from class: AbstractTransport
Notification that a request has come in. Subclasses should call this method to notify any message listeners.

Overrides:
requestReceived in class AbstractTransport
Parameters:
msg - The incoming request message.

replyReceived

public void replyReceived(TransactionMessage msg)
Description copied from class: AbstractTransport
Notification that a reply has come in. Subclasses should call this method to notify any waiters.

Overrides:
replyReceived in class AbstractTransport
Parameters:
msg - The incoming reply message.


Copyright © 2012. All Rights Reserved.