|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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 | |
private int |
priority
priority - higher is better. |
private java.lang.String |
stateShow
stateshow - the icon 'state' of the user |
private java.lang.String |
status
status string. |
Fields inherited from class org.jabber.jabberbeans.PacketBuilder |
errorCode,
errorText,
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,
getErrorCode,
getErrorText,
getExtensionVector,
getFromAddress,
getIdentifier,
getToAddress,
getType,
resetBase,
setErrorCode,
setErrorText,
setFromAddress,
setIdentifier,
setToAddress,
setType |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String status
private int priority
private java.lang.String stateShow
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.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
Packet
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |