public interface TransactionID
Interface that allows to identify a Transaction.
Each Transaction is identified by a TransactionID made of:
Transaction.send()
with the value
ConnectionParam.getClientID()
of the Connection on which the
transaction was sent.
Transaction.send()
with the couple
ConnectionOpenEvent.getClientServiceID()
and
ConnectionOpenEvent.getBusinessServiceID()
returned
on the Connection on which the transaction was sent.
Transaction.send()
with the sent
time and an incremental counter.
All TransactionIDs share a belongsTo()
method to check
their compatibility with a given Connection.
This interface extend the Serializable
interface in order to save and
then re-create TransactionID objects.
In alternative a programmer may save the five ints returned by
getClientID()
, getClientServiceID()
,
getBusinessServiceID()
, getTimeStamp()
and then re-create the
same TransactionID object using the
JFT.makeTransactionID()
with the 5 saved ints
as parameters.
Method Summary | |
---|---|
boolean |
belongsTo(Connection connection)
Returns the compatibility of this TransactionID with a given Connection. |
int |
getBusinessServiceID()
Returns the BusinessServiceID to which the transaction was sent. |
int |
getClientID()
Returns the ClientID from which the transaction was sent. |
int |
getClientServiceID()
Returns the ClientServiceID to which the transaction was sent. |
TimeStamp |
getTimeStamp()
Returns the TimeStamp of when the transaction was sent. |
Method Detail |
---|
boolean belongsTo(Connection connection)
Only a compatible transactionID can be successfully
queried using a
TransactionParam.setPendingTransactionID()
.
A TransactionID is compatible with a Connection if:
Connection ClientID
,
Connection ClientServiceID
,
Connection BusinessServiceID
.
connection
- Connection to be checked for compatibility
false
is returned when the connection
parameter is null
, Connection.STATUS_CONNECTED
.Transaction.query()
,
TransactionParam.getPendingTransactionID()
int getClientID()
ConnectionParam.getClientID()
int getClientServiceID()
ConnectionOpenEvent.getClientServiceID()
int getBusinessServiceID()
ConnectionOpenEvent.getBusinessServiceID()
TimeStamp getTimeStamp()
null
is never returned.