Class ibm.aglets.patterns.Meeting
All Packages Class Hierarchy This Package Previous Next Index
Class ibm.aglets.patterns.Meeting
java.lang.Object
|
+----ibm.aglets.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 (a) all already presented
aglets 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, and (b) the newly arrived aglet receives the
agletIDs of all the presented aglets.
-
Meeting(URL)
-
A Constructor
-
Meeting(URL, Vector)
-
A Constructor
-
getAttachedInfo()
-
-
getId()
-
-
getPlace()
-
-
ready(Aglet)
-
Accepts an aglet to a meeting.
-
setAttachedInfo(Object)
-
-
setColleagues(Vector)
-
-
setId(String)
-
Meeting
public Meeting(URL place)
- A Constructor
- Parameters:
- place - the meeting place.
Meeting
public Meeting(URL place,
Vector colleagues) throws AgletException
- A Constructor
- Parameters:
- place - the meeting place.
- colleagues - a list of agletIDs of aglets expected to be presented in the meeting place.
- Throws: AgletException
- if colleagues includes invalid items (e.g,
non agletID ones).
setId
public void setId(String id)
setAttachedInfo
public void setAttachedInfo(Object obj)
getAttachedInfo
public Object getAttachedInfo()
setColleagues
public void setColleagues(Vector colleagues) throws AgletException
getPlace
public URL getPlace()
getId
public String getId()
ready
public Enumeration ready(Aglet ag) throws AgletException
- Accepts an aglet to a meeting.
- Parameters:
- aglet - the arrived aglet.
- Returns:
- the agletIDs of all presented aglets.
- Throws: AgletException
- if the URL of the current host is different from the meeting place or if any of the colleagues is not presented.
All Packages Class Hierarchy This Package Previous Next Index