Package 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- Author:
- Artur Hefczyc
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringELEM_NAMEstatic java.lang.String[]MESSAGE_BODY_PATHstatic java.lang.String[]MESSAGE_DELAY_PATHstatic java.lang.String[]MESSAGE_ERROR_PATHstatic java.lang.String[]MESSAGE_SUBJECT_PATH-
Fields inherited from class tigase.server.Packet
CLIENT_XMLNS, elem, ERROR_NS, FROM_ATT, FULL_DEBUG, ID_ATT, PERM_ATT, PRIORITY_ATT, TO_ATT, TYPE_ATT, XMLNS_ATT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]getElNameErrorPath()A convenience method to provide XML path asString[]to error element.static PacketgetMessage(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.-
Methods inherited from class tigase.server.Packet
copyElementOnly, debug, elemToString, elemToStringSecure, errorResult, getAttributeStaticStr, getAttributeStaticStr, getCommand, getElemCData, getElemCDataStaticStr, getElemChild, getElemChild, getElemChildrenStaticStr, getElement, getElemName, getErrorCondition, getFrom, getPacketFrom, getPacketTo, getPermissions, getPriority, getProcessorsIds, getServerAuthorisedStanzaFrom, getSkippedProcessorsIds, getStableId, getStanzaFrom, getStanzaId, getStanzaTo, getTo, getType, getXMLNS, initVars, initVars, isCommand, isElement, isRouted, isServiceDisco, isXMLNSStaticStr, notProcessedBy, okResult, okResult, packetInstance, packetInstance, packetInstance, packRouted, processedBy, setPacketFrom, setPacketTo, setPermissions, setPriority, setServerAuthorisedStanzaFrom, setStableId, setXMLNS, swapFromTo, swapFromTo, swapStanzaFromTo, swapStanzaFromTo, toString, toString, toStringFull, toStringSecure, unpackRouted, wasProcessed, wasProcessedBy, wasSkipped
-
-
-
-
Field Detail
-
ELEM_NAME
public static final java.lang.String ELEM_NAME
- See Also:
- Constant Field Values
-
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
-
-
Constructor Detail
-
Message
public Message(Element elem) throws TigaseStringprepException
- Throws:
TigaseStringprepException
-
-
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 aJIDinstance with message source address.to- is aJIDinstance with message destination address.type- is aStanzaTypeobject with the message type.body- is aStringobject with message body content.subject- is aStringobject with message subject.thread- is aStringobject with message thread.id- is aStringobject with packet id value. Normally we do not set packet IDs for messages but in some cases this might be useful.- Returns:
- a new
Packetinstance (more specificallyMessageinstance) with the message stanza.
-
getElNameErrorPath
protected java.lang.String[] getElNameErrorPath()
Description copied from class:PacketA convenience method to provide XML path asString[]to error element. This method should be override by all classes extending this class.- Overrides:
getElNameErrorPathin classPacket- Returns:
- XML path to error element.
-
-