|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.messenger.container.BasicModule
org.jivesoftware.messenger.handler.PresenceUpdateHandler
public class PresenceUpdateHandler
Implements the presence protocol. Clients use this protocol to update presence and roster information.
The handler must properly detect the presence type, update the user's roster, and inform presence subscribers of the session's updated presence status. Presence serves many purposes in Jabber so this handler will likely be the most complex of all handlers in the server. There are four basic types of presence updates:
Constructor Summary | |
---|---|
PresenceUpdateHandler()
|
Method Summary | |
---|---|
Presence |
createSubscribePresence(JID senderAddress,
boolean isSubscribe)
|
void |
directedPresenceSent(Presence update,
ChannelHandler handler,
String jid)
Notification method sent to this handler when a user has sent a directed presence to an entity. |
void |
initialize(XMPPServer server)
Initializes the basic module. |
void |
process(Packet xmppPacket)
Process an XMPP packet. |
void |
process(Presence presence)
Handle presence updates that affect roster subscriptions. |
Methods inherited from class org.jivesoftware.messenger.container.BasicModule |
---|
destroy, getName, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PresenceUpdateHandler()
Method Detail |
---|
public void process(Packet xmppPacket) throws UnauthorizedException, PacketException
ChannelHandler
process
in interface ChannelHandler
xmppPacket
- a packet to process.
UnauthorizedException
- if not allowed to process the packet.
PacketException
- thrown if the packet is malformed (results in the sender's
session being shutdown).public void process(Presence presence) throws PacketException
presence
- The presence presence to handle
PacketException
public Presence createSubscribePresence(JID senderAddress, boolean isSubscribe)
public void directedPresenceSent(Presence update, ChannelHandler handler, String jid)
update
- the directed Presence sent by the user to an entity.handler
- the handler that routed the presence to the entity.jid
- the jid that the handler has processedpublic void initialize(XMPPServer server)
BasicModule
Initializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize
in interface Module
initialize
in class BasicModule
server
- the server hosting this module.
|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |