it.list.jft.event
Interface TransactionEvent

All Superinterfaces:
Event
All Known Subinterfaces:
TransactionQueryEvent, TransactionSendEvent

public interface TransactionEvent
extends Event

Generic event related to the Transaction Lifecycle.

Events related to this super-interface must be handled by the methods of TransactionListener.

With this event the server result is never Event.RESULT_OK.


Field Summary
static int RESULT_ABORTED
          Failure-code: transaction was aborted by the server.
static int RESULT_COMMITTED
          Failure-code: transaction was commited by the server.
static int RESULT_FLYING
          Failure-code: transaction is flying.
static int RESULT_INVALID_TRANSACTION_ID
          Failure-code: transaction is not valid because an invalid Transaction ID was used.
 
Fields inherited from interface Event
RESULT_GENERIC_ERROR, RESULT_OK
 
Method Summary
 Entity getEntity()
          Returns the result entity associated to this event.
 int getReasonCode()
          Returns the specific market-related reason about the transaction abort.
 TimeStamp getTimeStamp()
          Returns the result timestamp.
 Transaction getTransaction()
          Returns the transaction associated to this event.
 
Methods inherited from interface Event
getResult
 

Field Detail

RESULT_ABORTED

static final int RESULT_ABORTED
Failure-code: transaction was aborted by the server.

In this case getReasonCode() may be used to understand why the market aborted the transaction.

See Also:
Constant Field Values

RESULT_COMMITTED

static final int RESULT_COMMITTED
Failure-code: transaction was commited by the server.

See Also:
Constant Field Values

RESULT_FLYING

static final int RESULT_FLYING
Failure-code: transaction is flying.

See Also:
Constant Field Values

RESULT_INVALID_TRANSACTION_ID

static final int RESULT_INVALID_TRANSACTION_ID
Failure-code: transaction is not valid because an invalid Transaction ID was used.

See Also:
Constant Field Values
Method Detail

getTransaction

Transaction getTransaction()
Returns the transaction associated to this event.

Returns:
the transaction associated to this event.
null is never returned.

getTimeStamp

TimeStamp getTimeStamp()
Returns the result timestamp.

This method must be called only when the result is Event.RESULT_OK or when this event is instanceof TransactionQueryEvent.

Returns:
the result timestamp.
null is returned when the result is not Event.RESULT_OK and this event is not instanceof TransactionQueryEvent.

getEntity

Entity getEntity()
Returns the result entity associated to this event.

This method must be called only when the result is Event.RESULT_OK or when this event is instanceof TransactionQueryEvent.

Returns:
the result entity associated to this event.
null is returned when the result entity was not required, or
when the server choose to not send the result, or
the result is not Event.RESULT_OK and this event is not instanceof TransactionQueryEvent.

getReasonCode

int getReasonCode()
Returns the specific market-related reason about the transaction abort.

This method must be called only when the result is RESULT_ABORTED.

The exact meaning of the result depends on the specific market server and it is documented in the correspondig market server manual, apart from the following generic values:

Returns:
the specific market-related reason about the transaction abort.
Zero is returned when the result is not RESULT_ABORTED.


Submit a bug or feature to FT\API Programming Support<\font>