All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.tspaces.TupleSpaceEvent
java.lang.Object
|
+----com.ibm.tspaces.TupleSpaceEvent
- public class TupleSpaceEvent
- extends Object
This class implements tuplespace event.
The event contains an id which indicates the type
of event it is and which other Event variables are relavent for the event.
- Author:
- Matthias Eichstaedt
-
evt
- The next event.
-
id
- The type of this event.
-
source
- The space name where the event was triggered.
-
superTuple
- A tuple.
-
TUPLE_ADD
- The add-tuple constant.
-
TUPLE_REMOVE
- The removed-tuple constant.
-
UPDATE
- The update constant.
-
TupleSpaceEvent(String, int, SuperTuple)
- Constructs an event from the specified tuplespace,
event type, and tuple
-
add()
- Checks if this is an add event.
-
getID()
- Return the type of this event.
-
getTuple()
- Return the tuple of this event.
-
remove()
- Checks if this is a remove event.
-
toString()
- Return a string representation of this event.
-
update()
- Checks if this is an update event.
TUPLE_ADD
public static final int TUPLE_ADD
- The add-tuple constant.
TUPLE_REMOVE
public static final int TUPLE_REMOVE
- The removed-tuple constant.
UPDATE
public static final int UPDATE
- The update constant. Use this constant whenever its
neither add nor delete. ;-)
source
public String source
- The space name where the event was triggered.
id
public int id
- The type of this event.
superTuple
public SuperTuple superTuple
- A tuple.
evt
public TupleSpaceEvent evt
- The next event. Used when putting events into a linked list.
TupleSpaceEvent
public TupleSpaceEvent(String source,
int id,
SuperTuple superTuple)
- Constructs an event from the specified tuplespace,
event type, and tuple
- Parameters:
- source - - the space name from which the event was triggered
- id - - the event type
add
public boolean add()
- Checks if this is an add event.
- Returns:
- boolean - true if this in an add event
remove
public boolean remove()
- Checks if this is a remove event.
- Returns:
- boolean - true if this in a remove event
update
public boolean update()
- Checks if this is an update event.
- Returns:
- boolean - true if this in an update event
getID
public int getID()
- Return the type of this event.
- Returns:
- int - type of this event
getTuple
public SuperTuple getTuple()
- Return the tuple of this event.
- Returns:
- Tuple - this tuple
toString
public String toString()
- Return a string representation of this event.
- Parameters:
- String - - string representation
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index