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

## org.jivesoftware.openfire.disco
Interface DiscoInfoProvider

All Known Implementing Classes:
  AdHocCommandHandler, FileTransferProxy, IQOfflineMessagesHandler, MediaProxyService, MultiUserChatServerImpl, PubSubModule

    public interface DiscoInfoProvider

A DiscoInfoProvider is responsible for providing information about a JID's name and its node. For example, the room service could implement this interface in order to provide disco#info about its rooms. In this case, the JID's name will be the room's name and node will be null.

The information to provide has to include the entity's identity and the features offered and protocols supported by the target entity. The identity will be provided as an Element that will include the categoty, type and name attributes. Whilst the features will be just plain Strings.

Author:
  Gaston Dombiak

Method Summary
`XDataFormImpl` | `getExtendedInfo(String name, String node, JID senderJID)` Returns an XDataForm with the extended information about the entity or null if none.
`Iterator<String>` | `getFeatures(String name, String node, JID senderJID)` Returns an Iterator (of String) with the supported features.
`Iterator<org.dom4j.Element>` | `getIdentities(String name, String node, JID senderJID)` Returns an Iterator (of Element) with the target entity's identities.
`boolean` | `hasInfo(String name, String node, JID senderJID)` Returns true if we can provide information related to the requested name and node.

Method Detail

### getIdentities

    Iterator<org.dom4j.Element> getIdentities(String name,
                                              String node,
                                              JID senderJID)

  Returns an Iterator (of Element) with the target entity's identities. Each Element must include the categoty, type and name attributes of the entity.

  Parameters:
    `name` - the recipient JID's name.
    `node` - the requested disco node.
    `senderJID` - the XMPPAddress of user that sent the disco info request.
  Returns:
    an Iterator (of Element) with the target entity's identities.

### getFeatures

    Iterator<String> getFeatures(String name,
                                 String node,
                                 JID senderJID)

  Returns an Iterator (of String) with the supported features. The features to include are the features offered and supported protocols by the target entity identified by the requested name and node.

  Parameters:
    `name` - the recipient JID's name.
    `node` - the requested disco node.
    `senderJID` - the XMPPAddress of user that sent the disco info request.
  Returns:
    an Iterator (of String) with the supported features.

### getExtendedInfo

    XDataFormImpl getExtendedInfo(String name,
                                  String node,
                                  JID senderJID)

  Returns an XDataForm with the extended information about the entity or null if none. Each bit of information about the entity must be included as a value of a field of the form.

  Parameters:
    `name` - the recipient JID's name.
    `node` - the requested disco node.
    `senderJID` - the XMPPAddress of user that sent the disco info request.
  Returns:
    an XDataForm with the extended information about the entity or null if none.

### hasInfo

    boolean hasInfo(String name,
                    String node,
                    JID senderJID)

  Returns true if we can provide information related to the requested name and node. For example, if the requested name refers to a non-existant MUC room then the answer will be false. In case that the sender of the disco request is not authorized to discover this information an UnauthorizedException will be thrown.

  Parameters:
    `name` - the recipient JID's name.
    `node` - the requested disco node.
    `senderJID` - the XMPPAddress of user that sent the disco info request.
  Returns:
    true if we can provide information related to the requested name and node.

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

Copyright © 2003-2007 Jive Software.