类 EslEvent
java.lang.Object
link.thingscloud.freeswitch.esl.transport.event.EslEvent
FreeSWITCH Event Socket events are decoded into this data object.
An ESL event is modelled as a collection of text lines. An event always has several eventHeader
lines, and optionally may have some eventBody lines. In addition the messageHeaders of the
original containing EslMessage which carried the event are also available.
The eventHeader lines are parsed and cached in a map keyed by the eventHeader name string. An event
is always expected to have an "Event-Name" eventHeader. Commonly used eventHeader names are coded
in EslEventHeaderNames
Any eventBody lines are cached in a list.
The messageHeader lines from the original message are cached in a map keyed by EslHeaders.Name.
- 版本:
- 1.0.0
- 作者:
- : zhouhailin
- 另请参阅:
-
构造器概要
构造器构造器说明EslEvent(EslMessage rawMessage) Constructor for EslEvent.EslEvent(EslMessage rawMessage, boolean parseCommandReply) Constructor for EslEvent. -
方法概要
修饰符和类型方法说明Any event body lines that were present in the event.Convenience method.Convenience method.longConvenience method.The event headers of this event.Convenience method.The message headers of the original ESL message from which this event was decoded.booleanConvenience method.toString()
-
构造器详细资料
-
EslEvent
Constructor for EslEvent.
- 参数:
rawMessage- aEslMessageobject.
-
EslEvent
Constructor for EslEvent.
- 参数:
rawMessage- aEslMessageobject.parseCommandReply- a boolean.
-
-
方法详细资料
-
getMessageHeaders
The message headers of the original ESL message from which this event was decoded. The message headers are stored in a map keyed byEslHeaders.Name. The string mapped value is the parsed content of the header line (ie, it does not include the header name).- 返回:
- map of header values
-
getEventHeaders
The event headers of this event. The headers are parsed and stored in a map keyed by the string name of the header, and the string mapped value is the parsed content of the event header line (ie, it does not include the header name).- 返回:
- map of event header values
-
getEventBodyLines
Any event body lines that were present in the event.- 返回:
- list of decoded event body lines, may be an empty list.
-
getEventName
Convenience method.- 返回:
- the string value of the event header "Event-Name"
-
getEventDateTimestamp
public long getEventDateTimestamp()Convenience method.- 返回:
- long value of the event header "Event-Date-Timestamp"
-
getEventDateLocal
Convenience method.- 返回:
- long value of the event header "Event-Date-Local"
-
getEventDateGmt
Convenience method.- 返回:
- long value of the event header "Event-Date-GMT"
-
hasEventBody
public boolean hasEventBody()Convenience method.- 返回:
- true if the eventBody list is not empty.
-
toString
-