tigase.server

## Class Message

- java.lang.Object
- - tigase.server.Packet
  - - tigase.server.Message

-     public class Message
      extends Packet

  Created: Dec 31, 2009 8:38:38 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ELEM_NAME` Field description
    `static String[]` | `MESSAGE_BODY_PATH` Field description
    `static String[]` | `MESSAGE_DELAY_PATH` Field description
    `static String[]` | `MESSAGE_ERROR_PATH` Field description
    `static String[]` | `MESSAGE_SUBJECT_PATH` Field description

    - ### Fields inherited from class tigase.server.Packet

      `CLIENT_XMLNS, elem, FROM_ATT, FULL_DEBUG, ID_ATT, PERM_ATT, PRIORITY_ATT, TO_ATT, TYPE_ATT, XMLNS_ATT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Message(Element elem)` Constructs ...
    `Message(Element elem, JID stanzaFrom, JID stanzaTo)` Constructs ...

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String[]` | `getElNameErrorPath()` A convenience method to provide XML path as `String[]` to error element.
    `static Packet` | `getMessage(JID from, JID to, StanzaType type, String body, String subject, String thread, String id)` Creates a packet with message stanza.

    - ### Methods inherited from class tigase.server.Packet

      `copyElementOnly, debug, elemToString, elemToStringSecure, errorResult, getAttribute, getAttribute, getAttribute, getAttributeStaticStr, getAttributeStaticStr, getCommand, getElemCData, getElemCData, getElemCData, getElemCDataStaticStr, getElemChildren, getElemChildren, getElemChildrenStaticStr, getElement, getElemFrom, getElemName, getElemTo, getErrorCondition, getFrom, getPacketFrom, getPacketTo, getPermissions, getPriority, getProcessorsIds, getSkippedProcessorsIds, getStanzaFrom, getStanzaId, getStanzaTo, getTo, getType, getXMLNS, initVars, initVars, isCommand, isElement, isRouted, isServiceDisco, isXMLNS, isXMLNS, isXMLNSStaticStr, notProcessedBy, okResult, okResult, packetInstance, packetInstance, packetInstance, packRouted, processedBy, setPacketFrom, setPacketTo, setPermissions, setPriority, setXMLNS, swapElemFromTo, swapElemFromTo, swapFromTo, swapFromTo, swapStanzaFromTo, swapStanzaFromTo, toString, toString, toStringFull, toStringSecure, unpackRouted, wasProcessed, wasProcessedBy, wasSkipped`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ELEM_NAME

          public static final String ELEM_NAME

      Field description
      See Also:
        Constant Field Values

    - #### MESSAGE_BODY_PATH

          public static final String[] MESSAGE_BODY_PATH

      Field description

    - #### MESSAGE_SUBJECT_PATH

          public static final String[] MESSAGE_SUBJECT_PATH

      Field description

    - #### MESSAGE_ERROR_PATH

          public static final String[] MESSAGE_ERROR_PATH

      Field description

    - #### MESSAGE_DELAY_PATH

          public static final String[] MESSAGE_DELAY_PATH

      Field description

  - ### Constructor Detail

    - #### Message

          public Message(Element elem)
                  throws TigaseStringprepException

      Constructs ...
      Parameters:
        `elem` -
      Throws:
        `TigaseStringprepException`

    - #### Message

          public Message(Element elem,
                         JID stanzaFrom,
                         JID stanzaTo)

      Constructs ...
      Parameters:
        `elem` -
        `stanzaFrom` -
        `stanzaTo` -

  - ### Method Detail

    - #### getMessage

          public static Packet getMessage(JID from,
                                          JID to,
                                          StanzaType type,
                                          String body,
                                          String subject,
                                          String thread,
                                          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 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.

Copyright © 2018 "Tigase, Inc.". All rights reserved.