Enum 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.0.0

    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
    • 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 name
        NullPointerException - 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