tigase.jaxmpp.core.client.xmpp.stanzas
Class Presence

java.lang.Object
  extended by tigase.jaxmpp.core.client.xml.ElementWrapper
      extended by tigase.jaxmpp.core.client.xmpp.stanzas.Stanza
          extended by tigase.jaxmpp.core.client.xmpp.stanzas.Presence
All Implemented Interfaces:
Element

public class Presence
extends Stanza

Representation of Presence stanza.


Nested Class Summary
static class Presence.Show
          Availability sub-state
 
Nested classes/interfaces inherited from class tigase.jaxmpp.core.client.xmpp.stanzas.Stanza
Stanza.UnkownStanzaTypeException
 
Constructor Summary
Presence(Element element)
           
 
Method Summary
static Presence create()
          Creates new instance of stanza.
 String getNickname()
          Returns nickname.
 Integer getPriority()
          Returns priority level of resource.
 Presence.Show getShow()
          Return avaiability substate.
 String getStatus()
          Returns natural-language description of an entity's availability.
 void setNickname(String nickname)
          Sets nickname.
 void setPriority(Integer value)
          Sets priority level of resource.
 void setShow(Presence.Show show)
          Sets avaiability sub-state.
 void setStatus(String status)
          Sets natural-language description of an entity's availability.
 
Methods inherited from class tigase.jaxmpp.core.client.xmpp.stanzas.Stanza
canBeConverted, create, getErrorCondition, getFrom, getId, getTo, getType, getType, setFrom, setId, setTo, setType
 
Methods inherited from class tigase.jaxmpp.core.client.xml.ElementWrapper
addChild, equals, getAsString, getAttribute, getAttributes, getChildAfter, getChildElementValue, getChildElementValue, getChildren, getChildren, getChildrenNS, getChildrenNS, getFirstChild, getFirstChild, getName, getNextSibling, getParent, getValue, getXMLNS, hashCode, removeAttribute, removeChild, setAttribute, setAttributes, setChildElementValue, setChildElementValue, setParent, setValue, setXMLNS
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Presence

public Presence(Element element)
         throws XMLException
Throws:
XMLException
Method Detail

create

public static Presence create()
                       throws XMLException
Creates new instance of stanza.

Returns:
Presence
Throws:
XMLException

getNickname

public String getNickname()
                   throws XMLException
Returns nickname. Nickname is defined in XEP-0172: User Nickname.

Returns:
nickname or null if not present.
Throws:
XMLException

getPriority

public Integer getPriority()
                    throws XMLException
Returns priority level of resource.

Returns:
priority level.
Throws:
XMLException

getShow

public Presence.Show getShow()
                      throws XMLException
Return avaiability substate.

Returns:
Presence.Show
Throws:
XMLException

getStatus

public String getStatus()
                 throws XMLException
Returns natural-language description of an entity's availability.

Returns:
status
Throws:
XMLException

setNickname

public void setNickname(String nickname)
                 throws XMLException
Sets nickname. Nickname is defined in XEP-0172: User Nickname.

Parameters:
nickname - nickname
Throws:
XMLException

setPriority

public void setPriority(Integer value)
                 throws XMLException
Sets priority level of resource.

Parameters:
value -
Throws:
XMLException

setShow

public void setShow(Presence.Show show)
             throws XMLException
Sets avaiability sub-state.

Parameters:
show - Presence.Show
Throws:
XMLException

setStatus

public void setStatus(String status)
               throws XMLException
Sets natural-language description of an entity's availability.

Parameters:
status - description
Throws:
XMLException


Copyright © 2006-2012 Tigase. All Rights Reserved.