com.genesyslab.ail.event
Interface DnListener
- All Superinterfaces:
- ConfigObjectListener, java.util.EventListener, InteractionListener
- All Known Subinterfaces:
- AgentListener, PlaceListener
public interface DnListener
- extends ConfigObjectListener, InteractionListener
Listener for status changes of a Dn.
Use this listener to monitor events occurring on a particular DN.
Those events are:
-
DnEvent, if changes occur on the monitored DN.
-
InteractionEvent, if a new interaction occurs on the Dn interface, or if changes occur on one interaction handled by the monitored DN.
You do not need to process these interaction events if you register directly an InteractionListener on those interactions.
The following code snippet shows how to implement DnListener:
public class SimpleDnExample implements DnListener {
public SimpleDnExample(Dn exampleDn)
{
//Adding the listener
exampleDn.addDnListener(this);
}
public void handleInteractionEvent(InteractionEvent event)
{
//Implement this method to refresh your application:
//the received InteractionEvent propagates changes in one
//interaction of the DN, or triggers a new interaction.
}
public void handleDnEvent(DnEvent event)
{
//Implement this method to refresh your application
//depending on the information propagated in the DnEvent
}
public void contactChanged(InteractionEvent event)
{
//Implement this method to refresh your application
//with the new contact information of a voice interaction
}
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.
- See Also:
Dn,
DnEvent,
InteractionEvent
handleDnEvent
void handleDnEvent(DnEvent event)
- Receives an event about a DN.