Package org.jpos.transaction.participant
Class Switch
- java.lang.Object
-
- org.jpos.transaction.participant.Switch
-
- All Implemented Interfaces:
Configurable
,GroupSelector
,TransactionConstants
,TransactionParticipant
public class Switch extends java.lang.Object implements Configurable, GroupSelector
-
-
Constructor Summary
Constructors Constructor Description Switch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
prepare(long id, java.io.Serializable o)
Called by TransactionManager in preparation for a transactionjava.lang.String
select(long id, java.io.Serializable ser)
void
setConfiguration(Configuration cfg)
-
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.TransactionParticipant
abort, commit
-
-
-
-
Constructor Detail
-
Switch
public Switch()
-
-
Method Detail
-
select
public java.lang.String select(long id, java.io.Serializable ser)
- Specified by:
select
in interfaceGroupSelector
- Parameters:
id
- transaction idser
- transaction context- Returns:
- group name or null for no-action
-
prepare
public int prepare(long id, java.io.Serializable o)
Description copied from interface:TransactionParticipant
Called by TransactionManager in preparation for a transaction- Specified by:
prepare
in interfaceTransactionParticipant
- Parameters:
id
- the Transaction identifiero
- transaction context- Returns:
- PREPARED or ABORTED (| NO_JOIN | READONLY)
-
setConfiguration
public void setConfiguration(Configuration cfg)
- Specified by:
setConfiguration
in interfaceConfigurable
- Parameters:
cfg
- Configuration object
-
-