All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.agletx.patterns.Meeting

java.lang.Object
   |
   +----com.ibm.agletx.patterns.Meeting

public final class Meeting
extends Object
implements Serializable
This Meeting class abstracts light synchronization between multiple aglets by using a meeting concept. A meeting is established by creating a meeting object and distribute it among the aglets which suppose to participate in the meeting. A meeting object includes:
1. the meeting place (URL)
2. a meeting identifier
3. an optional list of agletIDs, named colleagues, of aglets which are expected to be presented at the meeting place
4. an optional object (named attachedInfo) describing additional information regarding the meeting (e.g. list or number of participants, minimum number of required participants).

Upon arrival to the meeting, an aglet notifies its arrival via the ready method. As a result all aglets already presented are notified of its arrival by receiving a special message (its kind is that of the meeting ID) with the agletID of this newly arrived aglet.


Constructor Index

 o Meeting(String)
A Constructor
 o Meeting(String, Vector)
A Constructor

Method Index

 o getAttachedInfo()
 o getID()
 o getPlace()
 o ready(Aglet)
Accepts an aglet to a meeting.
 o setAttachedInfo(Object)
 o setColleagues(Vector)
 o setID(String)

Constructors

 o Meeting
 public Meeting(String place)
A Constructor

Parameters:
place - the meeting place.
 o Meeting
 public Meeting(String place,
                Vector colleagues) throws AgletException
A Constructor

Parameters:
place - the meeting place.
colleagues - the colleagues
Throws: AgletException
if colleagues is invalid (should include only AgletID objects)

Methods

 o setID
 public void setID(String id)
 o setAttachedInfo
 public void setAttachedInfo(Object obj)
 o getAttachedInfo
 public Object getAttachedInfo()
 o setColleagues
 public void setColleagues(Vector colleagues) throws AgletException
 o getPlace
 public String getPlace()
 o getID
 public String getID()
 o ready
 public Enumeration ready(Aglet ag) throws AgletException
Accepts an aglet to a meeting.

Parameters:
aglet - the arrived aglet.
Returns:
enumeration of the agletID of all presented aglets.
Throws: AgletException
if wrong meeting place or if any of the colleagues is not presented.

All Packages  Class Hierarchy  This Package  Previous  Next  Index