Package tigase.server

Class Message

    • Field Detail

      • MESSAGE_BODY_PATH

        public static final java.lang.String[] MESSAGE_BODY_PATH
      • MESSAGE_SUBJECT_PATH

        public static final java.lang.String[] MESSAGE_SUBJECT_PATH
      • MESSAGE_ERROR_PATH

        public static final java.lang.String[] MESSAGE_ERROR_PATH
      • MESSAGE_DELAY_PATH

        public static final java.lang.String[] MESSAGE_DELAY_PATH
    • Method Detail

      • getMessage

        public static Packet getMessage​(JID from,
                                        JID to,
                                        StanzaType type,
                                        java.lang.String body,
                                        java.lang.String subject,
                                        java.lang.String thread,
                                        java.lang.String id)
        Creates a packet with message stanza.
        Parameters:
        from - is a JID instance with message source address.
        to - is a JID instance with message destination address.
        type - is a StanzaType object with the message type.
        body - is a String object with message body content.
        subject - is a String object with message subject.
        thread - is a String object with message thread.
        id - is a String object with packet id value. Normally we do not set packet IDs for messages but in some cases this might be useful.
        Returns:
        a new Packet instance (more specifically Message instance) with the message stanza.
      • getElNameErrorPath

        protected java.lang.String[] getElNameErrorPath()
        Description copied from class: Packet
        A convenience method to provide XML path as String[] to error element. This method should be override by all classes extending this class.
        Overrides:
        getElNameErrorPath in class Packet
        Returns:
        XML path to error element.