sunlabs.brazil.asterisk
Class AsteriskHandler.Events

java.lang.Object
  extended by sunlabs.brazil.asterisk.AsteriskHandler.Events
Enclosing class:
AsteriskHandler

public static class AsteriskHandler.Events
extends Object

Class to manage the set of events. This implementation maintains a vector of eventItems. XXX We need to detect when the requester of an event goes away XXX without unregistering the event, so we can remove it for them.


Constructor Summary
AsteriskHandler.Events()
           
 
Method Summary
 void addEvent(String queue, String key, String exp, String context, String serverName)
          Add an event to the current set of events.
 boolean processEvents(Dictionary event)
          Send the event to all the proper Q's.
 int removeEvents(String queue, String key, String exp)
          Remove events.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsteriskHandler.Events

public AsteriskHandler.Events()
Method Detail

addEvent

public void addEvent(String queue,
                     String key,
                     String exp,
                     String context,
                     String serverName)
Add an event to the current set of events. If the event expression already exists, add the queue name to the existing event, otherwise create a new event item.


removeEvents

public int removeEvents(String queue,
                        String key,
                        String exp)
Remove events. If a parameter is null, it matches everything. Warning: if all three parameters are null, then all events will be removed.


processEvents

public boolean processEvents(Dictionary event)
Send the event to all the proper Q's.


toString

public String toString()
Overrides:
toString in class Object

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.