lime
Class ReactionEvent
java.lang.Object
|
+--java.util.EventObject
|
+--lime.ReactionEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class ReactionEvent
- extends java.util.EventObject
Contains information related to an event that may fire a reaction.
When an enabled reaction is selected for execution, i.e., its listener
is going to be executed (see ReactionListener
for details)
the information about the event that triggered the reaction is packed into
a ReactionEvent
object and passed to the
reactsTo
listener, which effectively embodies the reaction.
Currently, the only kind of event that can trigger a reaction is the
insertion (or, more in general, the presence) of a tuple in the shared
tuple space, although a more sophisticated event handling mechanism is
being considered.
- Version:
- 1.0 alpha
- Author:
- Amy L. Murphy, Gian Pietro Picco
- See Also:
ReactionListener
,
Reaction
, Serialized Form
Fields inherited from class java.util.EventObject |
source |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getEventTuple
public lights.interfaces.ITuple getEventTuple()
- Get the tuple that triggered the reaction.
getReaction
public RegisteredReaction getReaction()
- Get the reaction this listener is associated with.
getSourceAgent
public AgentID getSourceAgent()
- Get the identifier of the agent owning the tuple space where the event
occurred.