com.orderlysoftware.orderlycalls.asterisk.manager.event
Class ManagerEvent

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap
              extended by com.orderlysoftware.orderlycalls.base.Message
                  extended by com.orderlysoftware.orderlycalls.asterisk.manager.event.ManagerEvent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class ManagerEvent
extends Message

Represents an event received from Asterisk over the Manager API

Author:
Matt King M.A. Oxon.
See Also:
Serialized Form

Constructor Summary
ManagerEvent(Message message)
          Constructor for converting a Message to an Event
 
Method Summary
 ManagerClient getClient()
          Gets the client that received this event.
 java.lang.String getType()
          Gets the type of the manager event.
 void setClient(ManagerClient client)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class com.orderlysoftware.orderlycalls.base.Message
addPair, addPair, getFreeform, getValue, isComplete, setComplete, setFreeform, toString
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ManagerEvent

public ManagerEvent(Message message)
Constructor for converting a Message to an Event

Parameters:
message -
Method Detail

getType

public java.lang.String getType()
Gets the type of the manager event.

This is the value of the "Event: type" pair, which is the first line in the event sent from Asterisk.

Returns:
Returns the type.

getClient

public ManagerClient getClient()
Gets the client that received this event.

Returns:
Returns the client.

setClient

public void setClient(ManagerClient client)
Parameters:
client - The client to set.

setType

public void setType(java.lang.String type)
Parameters:
type - The type to set.