Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.entitycaps
Class EntityCapabilitiesManager

    java.lang.Object
      org.jivesoftware.openfire.entitycaps.EntityCapabilitiesManager

All Implemented Interfaces:
  UserEventListener, org.xmpp.component.IQResultListener

    public class EntityCapabilitiesManager

extends Object
implements org.xmpp.component.IQResultListener, UserEventListener

Implements server side mechanics for XEP-0115: "Entity Capabilities" Version 1.4 In particular, EntityCapabilitiesManager is useful for processing "filtered-notifications" for use with Pubsub (XEP-0060) for contacts that may not want to receive notifications for all payload types. The server's role in managing Entity Capabilities is to cache previously encountered entity capabilities for XMPP clients supporting the same identities and features. If the server has not seen a particular combination of identities and features, a Discover Information query is sent to that client and its reply is cached for future use by clients sharing those same entity capabilities.

Author:
  Armando Jagucki

Method Summary
`void` | `answerTimeout(String packetId)`
`static String` | `generateVerHash(org.xmpp.packet.IQ packet, String algorithm)` Generates a 'ver' hash attribute used in validation to help prevent poisoning of entity capabilities information.
`EntityCapabilities` | `getEntityCapabilities(org.xmpp.packet.JID jid)` Returns the entity capabilities for a specific JID.
`static EntityCapabilitiesManager` | `getInstance()` Returns the unique instance of this class.
`void` | `process(org.xmpp.packet.Presence packet)`
`void` | `receivedAnswer(org.xmpp.packet.IQ packet)`
`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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static EntityCapabilitiesManager getInstance()

  Returns the unique instance of this class.

  Returns:
    the unique instance of this class.

### process

    public void process(org.xmpp.packet.Presence packet)

### generateVerHash

    public static String generateVerHash(org.xmpp.packet.IQ packet,
                                         String algorithm)

  Generates a 'ver' hash attribute used in validation to help prevent poisoning of entity capabilities information.

  Parameters:
    `packet` - IQ reply to the entity cap request.
    `algorithm` - The hashing algorithm to use (e.g. SHA-1)
  Returns:
    the generated 'ver' hash
  See Also:
    `The value of the 'ver' attribute is generated according to the method outlined in XEP-0115.`

### answerTimeout

    public void answerTimeout(String packetId)

  Specified by:
    `answerTimeout` in interface `org.xmpp.component.IQResultListener`

### receivedAnswer

    public void receivedAnswer(org.xmpp.packet.IQ packet)

  Specified by:
    `receivedAnswer` in interface `org.xmpp.component.IQResultListener`

### getEntityCapabilities

    public EntityCapabilities getEntityCapabilities(org.xmpp.packet.JID jid)

  Returns the entity capabilities for a specific JID. The specified JID should be a full JID that identitied the entity's connection.

  Parameters:
    `jid` - the full JID of entity
  Returns:
    the entity capabilities of jid.

### userDeleting

    public void userDeleting(User user,
                             Map<String,Object> params)

  Description copied from interface: `UserEventListener`
  A user is being deleted.

  Specified by:
    `userDeleting` in interface `UserEventListener`
  Parameters:
    `user` - the user.
    `params` - event parameters.

### userCreated

    public void userCreated(User user,
                            Map<String,Object> params)

  Description copied from interface: `UserEventListener`
  A user was created.

  Specified by:
    `userCreated` in interface `UserEventListener`
  Parameters:
    `user` - the user.
    `params` - event parameters.

### userModified

    public void userModified(User user,
                             Map<String,Object> params)

  Description copied from interface: `UserEventListener`
  A user's name, email, or an extended property was changed.

  Specified by:
    `userModified` in interface `UserEventListener`
  Parameters:
    `user` - the user.
    `params` - event parameters.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.