core.messages
Class PresenceMessage

java.lang.Object
  extended bycore.Message
      extended bycore.messages.PresenceMessage

public class PresenceMessage
extends Message

Author:
hoela
See Also:
PresenceType

Constructor Summary
PresenceMessage(java.lang.String source, java.lang.String destination, PresenceType type)
          Creates a new instance of ErrorMessage.
PresenceMessage(java.lang.String source, java.lang.String destination, PresenceType type, long id)
          Creates a new instance of ErrorMessage.
PresenceMessage(java.lang.String source, java.lang.String destination, PresenceType type, java.lang.String nickname, java.lang.String info, java.lang.String status, java.lang.String show)
          Creates a new instance of ErrorMessage.
PresenceMessage(java.lang.String source, java.lang.String destination, PresenceType type, java.lang.String nickname, java.lang.String info, java.lang.String status, java.lang.String show, long id)
          Creates a new instance of ErrorMessage.
 
Method Summary
 java.lang.String getInfo()
           
 java.lang.String getNickname()
           
 java.lang.String getShow()
          Returns the away message for this PresenceMessage.
 java.lang.String getStatus()
          Returns the away status for this PresenceMessage.
 PresenceType getType()
          Returns the PresenceType for this PresenceMessage.
 byte[] toXML()
          Converts the contents of this message to XML
 
Methods inherited from class core.Message
getDestination, getId, getMessageType, getSource, restamp
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresenceMessage

public PresenceMessage(java.lang.String source,
                       java.lang.String destination,
                       PresenceType type)
Creates a new instance of ErrorMessage.

Parameters:
source - the source's virtual address.
destination - the destination's virtual address.
type - the type of presence.

PresenceMessage

public PresenceMessage(java.lang.String source,
                       java.lang.String destination,
                       PresenceType type,
                       long id)
Creates a new instance of ErrorMessage.

Parameters:
source - the source's virtual address.
destination - the destination's virtual address.
type - the type of presence.
id - the id of the message.

PresenceMessage

public PresenceMessage(java.lang.String source,
                       java.lang.String destination,
                       PresenceType type,
                       java.lang.String nickname,
                       java.lang.String info,
                       java.lang.String status,
                       java.lang.String show)
Creates a new instance of ErrorMessage.

Parameters:
source -
destination -
type -
status -
show -

PresenceMessage

public PresenceMessage(java.lang.String source,
                       java.lang.String destination,
                       PresenceType type,
                       java.lang.String nickname,
                       java.lang.String info,
                       java.lang.String status,
                       java.lang.String show,
                       long id)
Creates a new instance of ErrorMessage.

Parameters:
source -
destination -
type -
status -
show -
id -
Method Detail

toXML

public byte[] toXML()
Converts the contents of this message to XML

Specified by:
toXML in class Message
Returns:
byte[] this message converted to XML.

getNickname

public java.lang.String getNickname()
Returns:
Returns the nickname.

getInfo

public java.lang.String getInfo()
Returns:
Returns the info.

getShow

public java.lang.String getShow()
Returns the away message for this PresenceMessage.

Returns:
the away message

getStatus

public java.lang.String getStatus()
Returns the away status for this PresenceMessage.

Returns:
the away status

getType

public PresenceType getType()
Returns the PresenceType for this PresenceMessage.

Returns:
the PresenceType