lime
Class UbiquitousReaction
java.lang.Object
|
+--lime.Reaction
|
+--lime.UbiquitousReaction
- All Implemented Interfaces:
- java.io.Serializable
- public class UbiquitousReaction
- extends Reaction
Specifies reactions that are location-independent and get installed on the
whole shared tuple space. In other words, these reactions are installed on
every node in the system (i.e., those currently present and, upon
engagement, also on the new ones).
This kind of reaction can be used only to define weak reaction
operations, using the LimeTupleSpace.addWeakReaction method. Strong
reactions require LocalizedReactions to be passed to the
addStrongReaction method.
- Version:
- 1.0 alpha
- Author:
- Amy L. Murphy, Gian Pietro Picco
- See Also:
Reaction,
LocalizedReaction,
ReactionListener,
LimeTupleSpace, Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UbiquitousReaction
public UbiquitousReaction(lights.interfaces.ITuple template,
ReactionListener listener,
short mode)
- Create the reaction.
- Parameters:
template - tuples in the shared tuple space that match this
template will trigger execution of the reaction, i.e., invocation of the
listener.listener - the reaction listener, which specifies the computation
to take place when the reaction is fired.mode - the reaction mode (see Reaction).
UbiquitousReaction
public UbiquitousReaction(AgentLocation dest,
lights.interfaces.ITuple template,
ReactionListener listener,
short mode)
- Create a ubiquitous reaction which restricts the destination
of matching tuples.
- Parameters:
template - tuples in the shared tuple space that match this
template will trigger execution of the reaction, i.e., invocation of the
listener.listener - the reaction listener, which specifies the computation
to take place when the reaction is fired.mode - the reaction mode (see Reaction).