|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PlaceListener
Listener for events on a Place.
Use PlaceListener to monitor:
DnEvent).
PlaceEvent).
InteractionEvent) occurring on any of the place's DNs or media.
You do not need to process DnEvents or InteractionEvents if you register directly another
DnListener or InteractionListener on the corresponding objects.
Note: The PlaceListener interface receives any interaction event,
even if the agent is no longer logged into DNs.
The following code snippet shows how to implement PlaceListener:
public class SimplePlaceExample implements PlaceListener
{
public SimplePlaceExample(Place examplePlace)
{
examplePlace.addPlaceListener(this);
}
// Handlers for place, DNs, and media modifications
public void dnAdded(String id)
{
//Implement this method to refresh your application
//when a DN is added to the place.
}
public void dnRemoved(String id)
{
//Implement this method to refresh your application
//when a DN is removed from the place.
}
public void handleDnEvent(DnEvent event)
{
//Implement this method to refresh your application
//depending on the information propagated in the DnEvent
//(status or other data change).
}
public void handlePlaceEvent(PlaceEvent event)
{
//Implement this method to refresh your application
//with new information concerning one media of the place:
//- Status and/or data change.
//- One media was added or removed
}
public void idModified(String id)
{
//Implement this method to take into account the new ID of the place
}
// Handlers for managing the interactions of the place.
public void handleInteractionEvent(InteractionEvent event)
{
//Implement this method to refresh your application:
//the received InteractionEvent propagates changes in one
//interaction of media and DNs of the place,
//or triggers a new interaction.
}
public void contactChanged(InteractionEvent event){
//Implement this method to refresh your application
//with the new contact information of one interaction of the place.
}
public void deleted(){}
}
Warning: If you want to perform a lengthy operation or an operation making calls to AIL methods, be sure that your application implements such code in a separate thread, not in the listener methods.
Media,
Dn,
DnEvent,
InteractionEvent,
PlaceEvent| Method Summary | |
|---|---|
void |
dnAdded(java.lang.String dn)
A DN has been added to this place. |
void |
dnRemoved(java.lang.String dn)
A DN has been removed from this place. |
void |
handlePlaceEvent(PlaceEvent event)
Receives an event on this place. |
void |
idModified(java.lang.String newId)
The ID of the place has been modified. |
| Methods inherited from interface com.genesyslab.ail.event.DnListener |
|---|
handleDnEvent |
| Methods inherited from interface com.genesyslab.ail.event.InteractionListener |
|---|
contactChanged, handleInteractionEvent |
| Method Detail |
|---|
void handlePlaceEvent(PlaceEvent event)
void idModified(java.lang.String newId)
newId - the new ID of the place.void dnAdded(java.lang.String dn)
dn - the ID of the DN.void dnRemoved(java.lang.String dn)
dn - the ID of the DN.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||