Package com.opencloud.util.cgin
Class MessageUtils
- java.lang.Object
-
- com.opencloud.util.cgin.MessageUtils
-
public class MessageUtils extends Object
Base class for message utility functions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageUtils.Codec
-
Constructor Summary
Constructors Constructor Description MessageUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName(Event event)StringgetProtocolName()Get the base name of the protocol.StringgetProtocolVariant()Get the name of the protocol variant.booleanisLegTerminatingEvent(Object eventType)Determine if the specified event type is a leg terminating event.booleanisLegTerminatingEvent(Object eventType, Object invokeArgument)Determine if the specified event type is a leg terminating event.
-
-
-
Method Detail
-
getProtocolName
public String getProtocolName()
Get the base name of the protocol. For example: "CAP", "INAP", etc.- Returns:
- the base name of the protocol. The default implementation in this class returns "??".
-
getProtocolVariant
public String getProtocolVariant()
Get the name of the protocol variant. For example, for CAP: "v1", "v2", etc, for INAP: "ETSI CS1", etc, etc.- Returns:
- the name of the protocol variant. The default implementation in this class returns "??".
-
isLegTerminatingEvent
public boolean isLegTerminatingEvent(Object eventType)
Determine if the specified event type is a leg terminating event. CAMEL events tCalledPartyBusy and tNoAnswer use the event parameter callForwarded to determine if the event is leg terminating. If you care about this then you must use the two-argument {code #isLegTerminatingEvent(Object, Object)}.- Parameters:
eventType- the CAMEL event type e.g. tCalledPartyBusy- Returns:
trueif the event type is a leg terminating event type,falseotherwise. The default implementation in this class always returnsfalse.
-
isLegTerminatingEvent
public boolean isLegTerminatingEvent(Object eventType, Object invokeArgument)
Determine if the specified event type is a leg terminating event.- Parameters:
eventType- the CAMEL event type e.g. tCalledPartyBusyinvokeArgument- CAMEL events tCalledPartyBusy and tNoAnswer use the event parameter callForwarded to determine if the event is leg terminating.- Returns:
trueif the event type is a leg terminating event type,falseotherwise. The default implementation in this class always returnsfalse.
-
-