|
Openfire 3.8.2 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.openfire.container.BasicModule
org.jivesoftware.openfire.handler.IQHandler
org.jivesoftware.openfire.pep.IQPEPHandler
public class IQPEPHandler
An IQHandler used to implement XEP-0163: "Personal Eventing via Pubsub"
Version 1.0
For each user on the server there is an associated PEPService interacting
with a single PubSubEngine for managing the user's PEP nodes.
An IQHandler can only handle one namespace in its IQHandlerInfo. However, PEP
related packets are seen having a variety of different namespaces. Thus,
classes like IQPEPOwnerHandler are used to forward packets having these other
namespaces to handleIQ(IQ).
This handler is used for the following namespaces:
| Field Summary |
|---|
| Fields inherited from class org.jivesoftware.openfire.handler.IQHandler |
|---|
deliverer, sessionManager |
| Constructor Summary | |
|---|---|
IQPEPHandler()
Constructs a new IQPEPHandler instance. |
|
| Method Summary | |
|---|---|
boolean |
addingContact(Roster roster,
RosterItem item,
boolean persistent)
Notification message indicating that a contact is about to be added to a roster. |
void |
availableSession(ClientSession session,
org.xmpp.packet.Presence presence)
Notification message indicating that a session that was not available is now available. |
void |
contactAdded(Roster roster,
RosterItem item)
Notification message indicating that a contact has been added to a roster. |
void |
contactDeleted(Roster roster,
RosterItem item)
Notification message indicating that a contact has been deleted from a roster. |
void |
contactUpdated(Roster roster,
RosterItem item)
Notification message indicating that a contact has been updated. |
void |
destroy()
Destroys the module. |
Iterator<String> |
getFeatures()
Implements ServerFeaturesProvider to include all supported XEP-0060 features in the server's disco#info result (as per section 4 of XEP-0163). |
Iterator<org.dom4j.Element> |
getIdentities()
Implements ServerIdentitiesProvider and UserIdentitiesProvider, adding the PEP identity to the respective disco#info results. |
IQHandlerInfo |
getInfo()
Returns the handler information to help generically handle IQ packets. |
PEPServiceManager |
getServiceManager()
|
Iterator<org.dom4j.Element> |
getUserItems(String name,
org.xmpp.packet.JID senderJID)
Implements UserItemsProvider, adding PEP related items to a disco#items result. |
org.xmpp.packet.IQ |
handleIQ(org.xmpp.packet.IQ packet)
Handles the received IQ packet. |
void |
initialize(XMPPServer server)
Initializes the basic module. |
boolean |
isEnabled()
Returns true if the PEP service is enabled in the server. |
void |
presenceChanged(ClientSession session,
org.xmpp.packet.Presence presence)
Notification message indicating that an available session has changed its presence. |
void |
rosterLoaded(Roster roster)
Notification message indicating that a roster has just been loaded. |
void |
start()
Starts the basic module. |
void |
stop()
Stops the basic module. |
void |
subscribedToPresence(org.xmpp.packet.JID subscriberJID,
org.xmpp.packet.JID authorizerJID)
Notification message indicating that a user has successfully subscribed to the presence of another user. |
void |
unavailableSession(ClientSession session,
org.xmpp.packet.Presence presence)
The following functions are unimplemented required interface methods. |
void |
unsubscribedToPresence(org.xmpp.packet.JID unsubscriberJID,
org.xmpp.packet.JID recipientJID)
Notification message indicating that a user has unsubscribed to the presence of another user. |
void |
userCreated(User user,
Map<String,Object> params)
A user was created. |
void |
userDeleting(User user,
Map<String,Object> params)
A user is being deleted. |
void |
userModified(User user,
Map<String,Object> params)
A user's name, email, or an extended property was changed. |
| Methods inherited from class org.jivesoftware.openfire.handler.IQHandler |
|---|
process |
| Methods inherited from class org.jivesoftware.openfire.container.BasicModule |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IQPEPHandler()
IQPEPHandler instance.
| Method Detail |
|---|
public void initialize(XMPPServer server)
BasicModuleInitializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize in interface Moduleinitialize in class IQHandlerserver - the server hosting this module.public PEPServiceManager getServiceManager()
public void destroy()
BasicModuleDestroys the module.
Does nothing in the basic module.
destroy in interface Moduledestroy in class BasicModulepublic void start()
BasicModuleStarts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start in interface Modulestart in class BasicModulepublic void stop()
BasicModuleStops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop in interface Modulestop in class BasicModulepublic IQHandlerInfo getInfo()
IQHandler
getInfo in class IQHandlerpublic Iterator<org.dom4j.Element> getIdentities()
getIdentities in interface ServerIdentitiesProvidergetIdentities in interface UserIdentitiesProviderpublic Iterator<String> getFeatures()
getFeatures in interface ServerFeaturesProviderpublic boolean isEnabled()
public org.xmpp.packet.IQ handleIQ(org.xmpp.packet.IQ packet)
throws UnauthorizedException
IQHandler
handleIQ in class IQHandlerpacket - the IQ packet to handle.
UnauthorizedException - if the user that sent the packet is not
authorized to request the given operation.
public Iterator<org.dom4j.Element> getUserItems(String name,
org.xmpp.packet.JID senderJID)
getUserItems in interface UserItemsProvidername - the recipient JID's name.senderJID - the XMPPAddress of user that sent the disco items request.
public void subscribedToPresence(org.xmpp.packet.JID subscriberJID,
org.xmpp.packet.JID authorizerJID)
PresenceEventListener
subscribedToPresence in interface PresenceEventListenersubscriberJID - the user that initiated the subscription.authorizerJID - the user that authorized the subscription.
public void unsubscribedToPresence(org.xmpp.packet.JID unsubscriberJID,
org.xmpp.packet.JID recipientJID)
PresenceEventListener
unsubscribedToPresence in interface PresenceEventListenerunsubscriberJID - the user that initiated the unsubscribe request.recipientJID - the recipient user of the unsubscribe request.
public void availableSession(ClientSession session,
org.xmpp.packet.Presence presence)
PresenceEventListener
availableSession in interface PresenceEventListenersession - the session that is now available.presence - the received available presence.
public void contactDeleted(Roster roster,
RosterItem item)
RosterEventListener
contactDeleted in interface RosterEventListenerroster - the roster that was updated.item - the roster item that was deleted.
public void userDeleting(User user,
Map<String,Object> params)
UserEventListener
userDeleting in interface UserEventListeneruser - the user.params - event parameters.
public void unavailableSession(ClientSession session,
org.xmpp.packet.Presence presence)
unavailableSession in interface PresenceEventListenersession - the session that is no longer available.presence - the received unavailable presence.
public void presenceChanged(ClientSession session,
org.xmpp.packet.Presence presence)
PresenceEventListener
presenceChanged in interface PresenceEventListenersession - the affected session.presence - the received available presence with the new information.
public boolean addingContact(Roster roster,
RosterItem item,
boolean persistent)
RosterEventListener
addingContact in interface RosterEventListenerroster - the roster that was updated.item - the new roster item.persistent - true if the new contact is going to be saved to the database.
public void contactAdded(Roster roster,
RosterItem item)
RosterEventListener
contactAdded in interface RosterEventListenerroster - the roster that was updated.item - the new roster item.
public void contactUpdated(Roster roster,
RosterItem item)
RosterEventListener
contactUpdated in interface RosterEventListenerroster - the roster that was updated.item - the updated roster item.public void rosterLoaded(Roster roster)
RosterEventListener
rosterLoaded in interface RosterEventListenerroster - the loaded roster.
public void userCreated(User user,
Map<String,Object> params)
UserEventListener
userCreated in interface UserEventListeneruser - the user.params - event parameters.
public void userModified(User user,
Map<String,Object> params)
UserEventListener
userModified in interface UserEventListeneruser - the user.params - event parameters.
|
Openfire 3.8.2 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||