|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.icatch.msg.CommitServer
public class CommitServer
A CommitServer takes care of incoming 2PC events (prepare, commit, rollback, forget and replay requests). It does this by listening on the transport for these types of messages. This class is generic and can be used with any 2PC message protocol.
Constructor Summary | |
---|---|
CommitServer()
Constructs a new instance. |
|
CommitServer(boolean trustClientTM)
|
Method Summary | |
---|---|
static String |
createGlobalUri(String addressPart,
String localIdPart)
Creates a globally unique URI from a given (unique) address part and a local ID part. |
static String |
extractLocalIdPart(String globalUri)
Extracts the local ID part from a global URI that belongs to a local coordinator. |
void |
init(boolean before,
Properties p)
Called before and after initialization. |
void |
init(TransactionService service,
Transport[] transports)
Initializes the instance. |
boolean |
messageReceived(TransactionMessage msg,
Transport transport)
The callback method, called by the transport when a message is received for this listener. |
void |
shutdown(boolean before)
Called before and after shutdown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommitServer()
public CommitServer(boolean trustClientTM)
Method Detail |
---|
public static final String createGlobalUri(String addressPart, String localIdPart)
addressPart
- The globally unique address part.localIdPart
- The locally unique ID part.
public static final String extractLocalIdPart(String globalUri)
globalUri
- The URI.
public void init(TransactionService service, Transport[] transports) throws SysException
service
- The transaction service.transports
- The transport list to listen on.
SysException
- On failure.public void init(boolean before, Properties p)
TSListener
init
in interface TSListener
before
- True indicates that initialization is about to start.
False indicates that initialization has finished. This means that
recovery has been done and the transaction service is now
ready to start new transactions.p
- The initialization properties.TSListener
public void shutdown(boolean before)
TSListener
shutdown
in interface TSListener
before
- True if shutdown is about to start.
False if shutdown has finished.TSListener
public boolean messageReceived(TransactionMessage msg, Transport transport)
MessageListener
messageReceived
in interface MessageListener
msg
- The message that was received.
MessageListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |