Package org.jivesoftware.smack.packet
Class PresenceBuilder
- java.lang.Object
-
- org.jivesoftware.smack.packet.StanzaBuilder<SB>
-
- org.jivesoftware.smack.packet.MessageOrPresenceBuilder<Presence,PresenceBuilder>
-
- org.jivesoftware.smack.packet.PresenceBuilder
-
- All Implemented Interfaces:
PresenceView
,StanzaView
,XmlLangElement
public final class PresenceBuilder extends MessageOrPresenceBuilder<Presence,PresenceBuilder> implements PresenceView
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addStanzaSpecificAttributes(ToStringUtil.Builder builder)
Presence
build()
Presence.Mode
getMode()
Returns the mode of the presence update.int
getPriority()
Returns the priority of the presence.byte
getPriorityByte()
Returns the priority of the presence.java.lang.String
getStatus()
Returns the status message of the presence update, ornull
if there is not a status.PresenceBuilder
getThis()
Presence.Type
getType()
Returns the type of this presence stanza.PresenceBuilder
ofType(Presence.Type type)
PresenceBuilder
setMode(Presence.Mode mode)
PresenceBuilder
setPriority(int priority)
PresenceBuilder
setPriority(java.lang.Byte priority)
PresenceBuilder
setStatus(java.lang.String status)
-
Methods inherited from class org.jivesoftware.smack.packet.StanzaBuilder
addExtension, addExtensions, addOptExtensions, buildIqData, buildMessage, buildMessage, buildMessageFrom, buildMessageFrom, buildPresence, buildPresence, buildPresenceFrom, buildPresenceFrom, buildResponse, from, from, getError, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getLanguage, getStanzaId, getTo, overrideExtension, removeExtension, removeExtension, setError, setLanguage, throwIfNoStanzaId, to, to, toString, willBuildStanzaWithId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.StanzaView
getError, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getStanzaId, getTo, hasExtension, hasExtension, hasExtension
-
Methods inherited from interface org.jivesoftware.smack.packet.XmlLangElement
getLanguage
-
-
-
-
Method Detail
-
addStanzaSpecificAttributes
protected void addStanzaSpecificAttributes(ToStringUtil.Builder builder)
- Specified by:
addStanzaSpecificAttributes
in classStanzaBuilder<PresenceBuilder>
-
ofType
public PresenceBuilder ofType(Presence.Type type)
-
setStatus
public PresenceBuilder setStatus(java.lang.String status)
-
setPriority
public PresenceBuilder setPriority(int priority)
-
setPriority
public PresenceBuilder setPriority(java.lang.Byte priority)
-
setMode
public PresenceBuilder setMode(Presence.Mode mode)
-
getThis
public PresenceBuilder getThis()
- Specified by:
getThis
in classStanzaBuilder<PresenceBuilder>
-
build
public Presence build()
- Specified by:
build
in classMessageOrPresenceBuilder<Presence,PresenceBuilder>
-
getType
public Presence.Type getType()
Description copied from interface:PresenceView
Returns the type of this presence stanza.- Specified by:
getType
in interfacePresenceView
- Returns:
- the type of the presence stanza.
-
getStatus
public java.lang.String getStatus()
Description copied from interface:PresenceView
Returns the status message of the presence update, ornull
if there is not a status. The status is free-form text describing a user's presence (i.e., "gone to lunch").- Specified by:
getStatus
in interfacePresenceView
- Returns:
- the status message.
-
getPriority
public int getPriority()
Description copied from interface:PresenceView
Returns the priority of the presence.- Specified by:
getPriority
in interfacePresenceView
- Returns:
- the priority.
- See Also:
- RFC 6121 § 4.7.2.3. Priority Element
-
getPriorityByte
public byte getPriorityByte()
Description copied from interface:PresenceView
Returns the priority of the presence.- Specified by:
getPriorityByte
in interfacePresenceView
- Returns:
- the priority.
- See Also:
- RFC 6121 § 4.7.2.3. Priority Element
-
getMode
public Presence.Mode getMode()
Description copied from interface:PresenceView
Returns the mode of the presence update.- Specified by:
getMode
in interfacePresenceView
- Returns:
- the mode.
-
-