Package org.jpos.transaction.participant
Class SendResponse
- java.lang.Object
-
- org.jpos.transaction.participant.SendResponse
-
- All Implemented Interfaces:
Configurable
,AbortParticipant
,TransactionConstants
,TransactionParticipant
public class SendResponse extends java.lang.Object implements AbortParticipant, Configurable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SendResponse.HeaderStrategy
-
Constructor Summary
Constructors Constructor Description SendResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(long id, java.io.Serializable context)
Called by TransactionManager upon transaction commit.void
commit(long id, java.io.Serializable context)
Called by TransactionManager upon transaction commit.int
prepare(long id, java.io.Serializable context)
Called by TransactionManager in preparation for a transactionvoid
setConfiguration(Configuration cfg)
void
setTransactionManager(TransactionManager tm)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jpos.transaction.AbortParticipant
prepareForAbort
-
-
-
-
Constructor Detail
-
SendResponse
public SendResponse()
-
-
Method Detail
-
prepare
public int prepare(long id, java.io.Serializable context)
Description copied from interface:TransactionParticipant
Called by TransactionManager in preparation for a transaction- Specified by:
prepare
in interfaceTransactionParticipant
- Parameters:
id
- the Transaction identifiercontext
- transaction context- Returns:
- PREPARED or ABORTED (| NO_JOIN | READONLY)
-
commit
public void commit(long id, java.io.Serializable context)
Description copied from interface:TransactionParticipant
Called by TransactionManager upon transaction commit. Warning: implementation should be able to handle multiple calls with the same transaction id (rare crash recovery)- Specified by:
commit
in interfaceTransactionParticipant
- Parameters:
id
- the Transaction identifiercontext
- transaction context
-
abort
public void abort(long id, java.io.Serializable context)
Description copied from interface:TransactionParticipant
Called by TransactionManager upon transaction commit. Warning: implementation should be able to handle multiple calls with the same transaction id (rare crash recovery)- Specified by:
abort
in interfaceTransactionParticipant
- Parameters:
id
- the Transaction identifiercontext
- transaction context
-
setConfiguration
public void setConfiguration(Configuration cfg) throws ConfigurationException
- Specified by:
setConfiguration
in interfaceConfigurable
- Parameters:
cfg
- Configuration object- Throws:
ConfigurationException
-
setTransactionManager
public void setTransactionManager(TransactionManager tm)
-
-