|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.wildfire.container.BasicModule org.jivesoftware.wildfire.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. |
boolean |
hasDirectPresence(Session session,
JID recipientJID)
|
void |
initialize(XMPPServer server)
Initializes the basic module. |
void |
process(Packet packet)
Process an XMPP packet. |
void |
process(Presence presence)
Handle presence updates that affect roster subscriptions. |
void |
process(Presence presence,
ClientSession session)
|
Methods inherited from class org.jivesoftware.wildfire.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 packet) throws UnauthorizedException, PacketException
ChannelHandler
process
in interface ChannelHandler
packet
- 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, ClientSession session) throws UnauthorizedException, PacketException
UnauthorizedException
PacketException
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 boolean hasDirectPresence(Session session, JID recipientJID)
public 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.
|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |