|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.PacketBuilder | +--org.jabber.jabberbeans.PresenceBuilder
This class is an abstraction of presence packets - both incoming and outgoing. Incoming presence packets are notifications on a resource - they are sent by the remote client's server when that client has a status change. Outgoing presence packets are of two types. You send out your presence by sending a packet to the server with your new status. The second type is a subscribe request, where you request a remote user add you to their presence notifications.
Field Summary |
Fields inherited from class org.jabber.jabberbeans.PacketBuilder |
error, extensions, fromAddress, identifier, toAddress, type |
Constructor Summary | |
PresenceBuilder()
Creates a new PresenceBuilder instance. |
Method Summary | |
Packet |
build()
Generates a new object based in this builder's state |
int |
getPriority()
Get the priority level being set by this message |
java.lang.String |
getStateShow()
Gets the state (icon) mentioned in this presence by name |
java.lang.String |
getStatus()
Gets the status associated with this presence message, if any |
void |
reset()
Reset is used to restore all values to their null/nothing
values, so that the builder can be safely reused. |
void |
setPriority(int priority)
Set the priority level being set by this message |
void |
setStateShow(java.lang.String state)
Sets the state (icon) to be mentioned in this presence by name |
void |
setStatus(java.lang.String status)
Sets the status associated with this presence message, if any |
Methods inherited from class org.jabber.jabberbeans.PacketBuilder |
addExtension, delExtension, getError, getErrorCode, getErrorText, getExtensionVector, getFromAddress, getIdentifier, getToAddress, getType, resetBase, setError, setErrorCode, setErrorText, setFromAddress, setIdentifier, setToAddress, setType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PresenceBuilder()
PresenceBuilder
instance.
Method Detail |
public void reset()
Reset
is used to restore all values to their null/nothing
values, so that the builder can be safely reused.
reset
in class PacketBuilder
public java.lang.String getStatus()
String
value, or null if no statuspublic void setStatus(java.lang.String status)
status
- a String
value, or null to clearpublic int getPriority()
int
value, with zero being the defaultpublic void setPriority(int priority)
priority
- an int
value, or zero to clear.public java.lang.String getStateShow()
String
value, or null if none setpublic void setStateShow(java.lang.String state)
state
- a String
value, or null to clearpublic Packet build() throws java.lang.InstantiationException
build
in class PacketBuilder
Packet
value
java.lang.InstantiationException
- if not enough information/
malformed information was passed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |