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

Variable Index

 o evt
The next event.
 o id
The type of this event.
 o source
The space name where the event was triggered.
 o superTuple
A tuple.
 o TUPLE_ADD
The add-tuple constant.
 o TUPLE_REMOVE
The removed-tuple constant.
 o UPDATE
The update constant.

Constructor Index

 o TupleSpaceEvent(String, int, SuperTuple)
Constructs an event from the specified tuplespace, event type, and tuple

Method Index

 o add()
Checks if this is an add event.
 o getID()
Return the type of this event.
 o getTuple()
Return the tuple of this event.
 o remove()
Checks if this is a remove event.
 o toString()
Return a string representation of this event.
 o update()
Checks if this is an update event.

Variables

 o TUPLE_ADD
 public static final int TUPLE_ADD
The add-tuple constant.

 o TUPLE_REMOVE
 public static final int TUPLE_REMOVE
The removed-tuple constant.

 o UPDATE
 public static final int UPDATE
The update constant. Use this constant whenever its neither add nor delete. ;-)

 o source
 public String source
The space name where the event was triggered.

 o id
 public int id
The type of this event.

 o superTuple
 public SuperTuple superTuple
A tuple.

 o evt
 public TupleSpaceEvent evt
The next event. Used when putting events into a linked list.

Constructors

 o 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

Methods

 o add
 public boolean add()
Checks if this is an add event.

Returns:
boolean - true if this in an add event
 o remove
 public boolean remove()
Checks if this is a remove event.

Returns:
boolean - true if this in a remove event
 o update
 public boolean update()
Checks if this is an update event.

Returns:
boolean - true if this in an update event
 o getID
 public int getID()
Return the type of this event.

Returns:
int - type of this event
 o getTuple
 public SuperTuple getTuple()
Return the tuple of this event.

Returns:
Tuple - this tuple
 o 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