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
DialogMessageEventfor 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 BEGINyes yes no yes com.opencloud.slee.resources.cgin.DialogMessage.BEGINCONTINUEyes no no yes com.opencloud.slee.resources.cgin.DialogMessage.CONTINUEENDyes no yes yes com.opencloud.slee.resources.cgin.DialogMessage.ENDITU_UNIno yes yes yes com.opencloud.slee.resources.cgin.DialogMessage.ITU_UNIANSI message types QUERY_WITH_PERMISSIONyes yes no yes com.opencloud.slee.resources.cgin.DialogMessage.QUERYQUERY_WITHOUT_PERMISSIONyes yes no no CONVERSATION_WITH_PERMISSIONyes no no yes com.opencloud.slee.resources.cgin.DialogMessage.CONVERSATIONCONVERSATION_WITHOUT_PERMISSIONyes no no no RESPONSEyes no yes yes com.opencloud.slee.resources.cgin.DialogMessage.RESPONSEANSI_UNIno yes no no com.opencloud.slee.resources.cgin.DialogMessage.ANSI_UNI
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANSI_UNIBEGINAn ITU TC-BEGIN messageCONTINUECONVERSATION_WITH_PERMISSIONCONVERSATION_WITHOUT_PERMISSIONENDITU_UNIQUERY_WITH_PERMISSIONAn ANSI QUERY WITH PERMISSION messageQUERY_WITHOUT_PERMISSIONAn ANSI QUERY WITHOUT PERMISSION messageRESPONSE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EventTypeIDgetEventTypeID()booleanhasPermission()booleanisANSI()booleanisFirstMessage()booleanisITU()booleanisLastMessage()booleanisStructured()static DialogMessageTypevalueOf(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
-
-