rcf.core.concurrent.events
Interface Event

All Known Subinterfaces:
CausedEvent, CompositeTransaction<X>, DynamicPropertyEvent<T,P>, EventCausedEvent, IdentityChangeEvent<T>, TaskEvent, ThrowableCausedEvent, Transaction
All Known Implementing Classes:
AbstractTransaction, DynamicPropertyEvent.Caused, DynamicPropertyEvent.Default, ExternalTransaction, TaskEvent.Default

@Revision(value="$Revision: 1.6 $",
          date="$Date: 2006/12/15 20:37:49 $",
          tag="$Name:  $")
public interface Event

An instance of this interface encapsulates some kind of meaningful sequenced event from a source. This interface is the basis of the rcf.core.concurrent.events package, and is widely used. For more information about the various kinds of events, please check the interfaces and classes which inherit from this one.

TODO: Javadoc review, Seal/Finalize

Version:
$Revision: 1.6 $
Author:
Greg Gibeling

Method Summary
 int getEventSequenceNumber()
          Get the sequence number of this event relative to it's source().
 boolean isCancelled()
          Test if this event has been cancelled.
 EventSource source()
          Get the EventSource this event was generated from.
 

Method Detail

getEventSequenceNumber

int getEventSequenceNumber()
Get the sequence number of this event relative to it's source().

Returns:
The sequence number of this event relative to it's source().

source

EventSource source()
Get the EventSource this event was generated from.

Returns:
The EventSource this event was generated from.

isCancelled

boolean isCancelled()
Test if this event has been cancelled. This method is used to tell the event syndicate reporting this event to stop bothering, because it's been cancelled.

This is used in conjunction with Transaction.abort(). The return value from this method has no meaning outside of the event syndicate reporting loop. Often this method will simply return Task.taskState() == Task.State.Aborted.

Returns:
true if this event has been cancelled, and no longer needs to be reported.