Enum DialogMessageType
- java.lang.Object
-
- java.lang.Enum<DialogMessageType>
-
- DialogMessageType
-
- All Implemented Interfaces:
Serializable
,Comparable<DialogMessageType>
public enum DialogMessageType extends Enum<DialogMessageType>
Enumeration of possible dialog network message types. Each enum instance knows the characteristics of the message type (e.g. whether it is the last message in a dialog, whether it is ITU or ANSI, the EventTypeID the message will be fired with, etc)When using the message-oriented event API, messages are fired with an event class of
DialogMessageEvent
for all types, and an event type of:- Name: com.opencloud.slee.resources.cgin.DialogMessage.<message type> (see table)
- Vendor: OpenCloud
- Version: 3.1
The characteristics of the different message types are:
Message type enum structured? first message? last message? permission? event type name ITU message types BEGIN
yes yes no yes com.opencloud.slee.resources.cgin.DialogMessage.BEGIN
CONTINUE
yes no no yes com.opencloud.slee.resources.cgin.DialogMessage.CONTINUE
END
yes no yes yes com.opencloud.slee.resources.cgin.DialogMessage.END
ITU_UNI
no yes yes yes com.opencloud.slee.resources.cgin.DialogMessage.ITU_UNI
ANSI message types QUERY_WITH_PERMISSION
yes yes no yes com.opencloud.slee.resources.cgin.DialogMessage.QUERY
QUERY_WITHOUT_PERMISSION
yes yes no no CONVERSATION_WITH_PERMISSION
yes no no yes com.opencloud.slee.resources.cgin.DialogMessage.CONVERSATION
CONVERSATION_WITHOUT_PERMISSION
yes no no no RESPONSE
yes no yes yes com.opencloud.slee.resources.cgin.DialogMessage.RESPONSE
ANSI_UNI
no yes no no com.opencloud.slee.resources.cgin.DialogMessage.ANSI_UNI
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANSI_UNI
BEGIN
An ITU TC-BEGIN messageCONTINUE
CONVERSATION_WITH_PERMISSION
CONVERSATION_WITHOUT_PERMISSION
END
ITU_UNI
QUERY_WITH_PERMISSION
An ANSI QUERY WITH PERMISSION messageQUERY_WITHOUT_PERMISSION
An ANSI QUERY WITHOUT PERMISSION messageRESPONSE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EventTypeID
getEventTypeID()
boolean
hasPermission()
boolean
isANSI()
boolean
isFirstMessage()
boolean
isITU()
boolean
isLastMessage()
boolean
isStructured()
static DialogMessageType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DialogMessageType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BEGIN
public static final DialogMessageType BEGIN
An ITU TC-BEGIN message
-
CONTINUE
public static final DialogMessageType CONTINUE
-
END
public static final DialogMessageType END
-
ITU_UNI
public static final DialogMessageType ITU_UNI
-
QUERY_WITH_PERMISSION
public static final DialogMessageType QUERY_WITH_PERMISSION
An ANSI QUERY WITH PERMISSION message
-
QUERY_WITHOUT_PERMISSION
public static final DialogMessageType QUERY_WITHOUT_PERMISSION
An ANSI QUERY WITHOUT PERMISSION message
-
CONVERSATION_WITH_PERMISSION
public static final DialogMessageType CONVERSATION_WITH_PERMISSION
-
CONVERSATION_WITHOUT_PERMISSION
public static final DialogMessageType CONVERSATION_WITHOUT_PERMISSION
-
RESPONSE
public static final DialogMessageType RESPONSE
-
ANSI_UNI
public static final DialogMessageType ANSI_UNI
-
-
Method Detail
-
values
public static DialogMessageType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DialogMessageType c : DialogMessageType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DialogMessageType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isITU
public boolean isITU()
- Returns:
- true if this message type is an ITU message type
-
isANSI
public boolean isANSI()
- Returns:
- true if this message type is an ANSI message type
-
isStructured
public boolean isStructured()
- Returns:
- true if this message type is part of a structured dialog message (anything but unidirectional messages)
-
isFirstMessage
public boolean isFirstMessage()
- Returns:
- true if this message type starts a new dialog. Note that unidirectional messages are considered to both start a new dialog, and be the last message of a dialog.
-
isLastMessage
public boolean isLastMessage()
- Returns:
- true if this message type is the last message on the dialog. Note that unidirectional messages are considered to both start a new dialog, and be the last message of a dialog.
-
hasPermission
public boolean hasPermission()
- Returns:
- true if the receiver of this message has permission to end the dialog (the "with permission" message type in ANSI). ITU messages, unidirectional messages, and the RESPONSE message type always return true.
-
getEventTypeID
public EventTypeID getEventTypeID()
- Returns:
- the event type used to fire messages of this type
-
-