Class AsteriskHandler.Events

  • Enclosing class:
    AsteriskHandler

    public static class AsteriskHandler.Events
    extends java.lang.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

      Constructors 
      Constructor Description
      Events()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addEvent​(java.lang.String queue, java.lang.String key, java.lang.String exp, java.lang.String context, java.lang.String serverName)
      Add an event to the current set of events.
      boolean processEvents​(java.util.Dictionary event)
      Send the event to all the proper Q's.
      int removeEvents​(java.lang.String queue, java.lang.String key, java.lang.String exp)
      Remove events.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Events

        public Events()
    • Method Detail

      • addEvent

        public void addEvent​(java.lang.String queue,
                             java.lang.String key,
                             java.lang.String exp,
                             java.lang.String context,
                             java.lang.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​(java.lang.String queue,
                                java.lang.String key,
                                java.lang.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​(java.util.Dictionary event)
        Send the event to all the proper Q's.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object