fulmine.event
Interface IEvent

All Superinterfaces:
Cloneable, IAddressable, IDescriptor
All Known Subinterfaces:
IComponent, IContainer, IContainerDefinitionField, IField, ISystemEvent
All Known Implementing Classes:
AbstractComponent, AbstractContainer, AbstractContainerFieldEvent, AbstractDynamicContainer, AbstractEvent, AbstractEventProcessingContainer, AbstractField, AbstractSystemEvent, ActiveAsymmetricEventProcessor, AsymmetricEventProcessor, AsymmetricEventProcessor.Result, BasicContainer, BooleanField, ChannelDestroyedEvent, ChannelReadyEvent, ConnectionAvailableEvent, ConnectionDestroyedEvent, ContainerCreatedEvent, ContainerDefinitionField, ContainerDestroyedEvent, ContainerFieldAddedEvent, ContainerFieldRemovedEvent, ContainerStateChangeEvent, ContextDiscoveredEvent, ContextNotAvailableEvent, DescriptorField, DoubleField, EventSource, EventSourceNotObservedEvent, EventSourceObservedEvent, FloatField, ImageEvent, IntegerField, LongField, MessageConsumedEvent, MessageEvent, Record, RemoteContainerCreatedEvent, RemoteContainerDestroyedEvent, RpcInvokeEvent, RxEvent, SendRpcEvent, StringField, SubscribeEvent, SystemEventSource, TxEvent, UnsubscribeEvent

public interface IEvent
extends Cloneable, IDescriptor, IAddressable

An event represents a change that needs to be broadcasted to consumers. An event is generated by an IEventSource and is consumed by IEventListener objects. These listeners are registered against the source using the IEventSource.addListener(IEventListener) method.

Author:
Ramon Servadei

Method Summary
 Object clone()
          Clone this.
 IEventFrameExecution getDrivingFrame()
          Get the event frame execution that directly caused this event to occur.
 IEventFrameExecution getFrame()
          Get the event frame of this event.
 IEventSource getSource()
          Get the event source that generated this event
 IEvent getTriggerEvent()
          Get the 'trigger event'.
 void setTriggerEvent(IEvent triggerEvent)
          Set the 'trigger event'.
 
Methods inherited from interface fulmine.IDescriptor
toDetailedString, toIdentityString
 
Methods inherited from interface fulmine.IAddressable
getAddress, getDomain, getIdentity, getType
 

Method Detail

getSource

IEventSource getSource()
Get the event source that generated this event

Returns:
the source that generated the event

getFrame

IEventFrameExecution getFrame()
Get the event frame of this event.

Returns:
the IEventFrameExecution that identifies the frame this event occurred in.

getDrivingFrame

IEventFrameExecution getDrivingFrame()
Get the event frame execution that directly caused this event to occur.

An event occurs in its own event frame but it may have been caused by an event from another frame. This other frame is known as the 'driving' frame and directly causes this event. In this paradigm, where one event can cause another event to occur but in a separate event frame execution, it is sometimes necessary to know the frame of the first event so that the 2 events can be linked together.

Returns:
an IEventFrameExecution that is the event frame execution of the event that caused this event to occur.

clone

Object clone()
             throws CloneNotSupportedException
Clone this.

Returns:
a clone of this
Throws:
CloneNotSupportedException
See Also:
Object#clone)_

setTriggerEvent

void setTriggerEvent(IEvent triggerEvent)
Set the 'trigger event'. This is an event that is added to the context's IEventManager queue after this event has been processed.

Parameters:
triggerEvent - the trigger event that will be queued after this event has been processed.

getTriggerEvent

IEvent getTriggerEvent()
Get the 'trigger event'. This is an event that is added to the context's IEventManager queue after this event has been processed.

Returns:
the trigger event to queue after this event has been processed, or null if there is not a trigger event.


Copyright © 2007-2009. All Rights Reserved.