org.mobicents.media.server.mgcp.controller.signal
Class Event

java.lang.Object
  extended by org.mobicents.media.server.mgcp.controller.signal.Event

public class Event
extends Object

Event thrown by endpoint or connection. Event has one more associated handlers or action. When match(Text) is called the requested action is selected for execution when this event will be detected.

Author:
kulikov

Constructor Summary
Event(Text eventName)
          Constructs new event name.
 
Method Summary
 void add(EventAction action)
          Adds handlers for this event.
 void fire(Signal s, Text options)
          Executes action associated with this event
 Text getName()
          Gets the name of this event.
 boolean isActive()
          Is this event requested or not.
 boolean matches(Text eventDescriptor)
          Checks that this event objects matches to the specified event descriptor.
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event(Text eventName)
Constructs new event name.

Parameters:
eventName -
Method Detail

getName

public Text getName()
Gets the name of this event.

Returns:
name of this event.

add

public void add(EventAction action)
Adds handlers for this event.

Parameters:
action - the event handler.

matches

public boolean matches(Text eventDescriptor)
Checks that this event objects matches to the specified event descriptor.

Parameters:
event - the event descriptor which includes the event name and requested action.
Returns:
true if event name specified in descriptor matches to this name of this event object.

isActive

public boolean isActive()
Is this event requested or not.

Returns:
true if this event requested for detection or false otherwise.

fire

public void fire(Signal s,
                 Text options)
Executes action associated with this event


reset

public void reset()


Copyright © 2012 TeleStax, Inc.. All Rights Reserved.