mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 14:01:08 +01:00
Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
This commit is contained in:
parent
9d61a6de7d
commit
e8923b9d16
545 changed files with 3713 additions and 3715 deletions
|
|
@ -38,9 +38,9 @@ public interface NodeInformationProvider {
|
|||
|
||||
/**
|
||||
* Returns a list of the Items {@link org.jivesoftware.smackx.disco.packet.DiscoverItems.Item}
|
||||
* defined in the node. For example, the MUC protocol specifies that an XMPP client should
|
||||
* defined in the node. For example, the MUC protocol specifies that an XMPP client should
|
||||
* answer an Item for each joined room when asked for the rooms where the use has joined.
|
||||
*
|
||||
*
|
||||
* @return a list of the Items defined in the node.
|
||||
*/
|
||||
List<DiscoverItems.Item> getNodeItems();
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ import org.jxmpp.util.cache.ExpirationCache;
|
|||
* <li>Automatic response when this XMPP entity is queried for information.
|
||||
* <li>Ability to discover items and information of remote XMPP entities.
|
||||
* <li>Ability to publish publicly available items.
|
||||
* </ol>
|
||||
*
|
||||
* </ol>
|
||||
*
|
||||
* @author Gaston Dombiak
|
||||
* @author Florian Schmaus
|
||||
*/
|
||||
|
|
@ -101,7 +101,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
/**
|
||||
* Set the default identity all new connections will have. If unchanged the default identity is an
|
||||
* identity where category is set to 'client', type is set to 'pc' and name is set to 'Smack'.
|
||||
*
|
||||
*
|
||||
* @param identity
|
||||
*/
|
||||
public static void setDefaultIdentity(DiscoverInfo.Identity identity) {
|
||||
|
|
@ -109,10 +109,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a new ServiceDiscoveryManager for a given XMPPConnection. This means that the
|
||||
* Creates a new ServiceDiscoveryManager for a given XMPPConnection. This means that the
|
||||
* service manager will respond to any service discovery request that the connection may
|
||||
* receive.
|
||||
*
|
||||
* receive.
|
||||
*
|
||||
* @param connection the connection to which a ServiceDiscoveryManager is going to be created.
|
||||
*/
|
||||
private ServiceDiscoveryManager(XMPPConnection connection) {
|
||||
|
|
@ -121,7 +121,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
addFeature(DiscoverInfo.NAMESPACE);
|
||||
addFeature(DiscoverItems.NAMESPACE);
|
||||
|
||||
// Listen for disco#items requests and answer with an empty result
|
||||
// Listen for disco#items requests and answer with an empty result
|
||||
connection.registerIQRequestHandler(new AbstractIqRequestHandler(DiscoverItems.ELEMENT, DiscoverItems.NAMESPACE, IQ.Type.get, Mode.async) {
|
||||
@Override
|
||||
public IQ handleIQRequest(IQ iqRequest) {
|
||||
|
|
@ -150,8 +150,8 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
});
|
||||
|
||||
// Listen for disco#info requests and answer the client's supported features
|
||||
// To add a new feature as supported use the #addFeature message
|
||||
// Listen for disco#info requests and answer the client's supported features
|
||||
// To add a new feature as supported use the #addFeature message
|
||||
connection.registerIQRequestHandler(new AbstractIqRequestHandler(DiscoverInfo.ELEMENT, DiscoverInfo.NAMESPACE, IQ.Type.get, Mode.async) {
|
||||
@Override
|
||||
public IQ handleIQRequest(IQ iqRequest) {
|
||||
|
|
@ -193,7 +193,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
/**
|
||||
* Returns the name of the client that will be returned when asked for the client identity
|
||||
* in a disco request. The name could be any value you need to identity this client.
|
||||
*
|
||||
*
|
||||
* @return the name of the client that will be returned when asked for the client identity
|
||||
* in a disco request.
|
||||
*/
|
||||
|
|
@ -223,11 +223,11 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the type of client that will be returned when asked for the client identity in a
|
||||
* disco request. The valid types are defined by the category client. Follow this link to learn
|
||||
* Returns the type of client that will be returned when asked for the client identity in a
|
||||
* disco request. The valid types are defined by the category client. Follow this link to learn
|
||||
* the possible types: <a href="http://xmpp.org/registrar/disco-categories.html#client">Jabber::Registrar</a>.
|
||||
*
|
||||
* @return the type of client that will be returned when asked for the client identity in a
|
||||
*
|
||||
* @return the type of client that will be returned when asked for the client identity in a
|
||||
* disco request.
|
||||
*/
|
||||
public String getIdentityType() {
|
||||
|
|
@ -236,7 +236,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Add an further identity to the client.
|
||||
*
|
||||
*
|
||||
* @param identity
|
||||
*/
|
||||
public synchronized void addIdentity(DiscoverInfo.Identity identity) {
|
||||
|
|
@ -249,7 +249,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
/**
|
||||
* Remove an identity from the client. Note that the client needs at least one identity, the default identity, which
|
||||
* can not be removed.
|
||||
*
|
||||
*
|
||||
* @param identity
|
||||
* @return true, if successful. Otherwise the default identity was given.
|
||||
*/
|
||||
|
|
@ -264,7 +264,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Returns all identities of this client as unmodifiable Collection.
|
||||
*
|
||||
*
|
||||
* @return all identies as set
|
||||
*/
|
||||
public Set<DiscoverInfo.Identity> getIdentities() {
|
||||
|
|
@ -276,7 +276,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Returns the ServiceDiscoveryManager instance associated with a given XMPPConnection.
|
||||
*
|
||||
*
|
||||
* @param connection the connection used to look for the proper ServiceDiscoveryManager.
|
||||
* @return the ServiceDiscoveryManager associated with a given XMPPConnection.
|
||||
*/
|
||||
|
|
@ -292,7 +292,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Add discover info response data.
|
||||
*
|
||||
*
|
||||
* @see <a href="http://xmpp.org/extensions/xep-0030.html#info-basic">XEP-30 Basic Protocol; Example 2</a>
|
||||
*
|
||||
* @param response the discover info response packet
|
||||
|
|
@ -309,14 +309,14 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the NodeInformationProvider responsible for providing information
|
||||
* Returns the NodeInformationProvider responsible for providing information
|
||||
* (ie items) related to a given node or <tt>null</null> if none.<p>
|
||||
*
|
||||
*
|
||||
* In MUC, a node could be 'http://jabber.org/protocol/muc#rooms' which means that the
|
||||
* NodeInformationProvider will provide information about the rooms where the user has joined.
|
||||
*
|
||||
*
|
||||
* @param node the node that contains items associated with an entity not addressable as a JID.
|
||||
* @return the NodeInformationProvider responsible for providing information related
|
||||
* @return the NodeInformationProvider responsible for providing information related
|
||||
* to a given node.
|
||||
*/
|
||||
private NodeInformationProvider getNodeInformationProvider(String node) {
|
||||
|
|
@ -327,14 +327,14 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the NodeInformationProvider responsible for providing information
|
||||
* Sets the NodeInformationProvider responsible for providing information
|
||||
* (ie items) related to a given node. Every time this client receives a disco request
|
||||
* regarding the items of a given node, the provider associated to that node will be the
|
||||
* regarding the items of a given node, the provider associated to that node will be the
|
||||
* responsible for providing the requested information.<p>
|
||||
*
|
||||
*
|
||||
* In MUC, a node could be 'http://jabber.org/protocol/muc#rooms' which means that the
|
||||
* NodeInformationProvider will provide information about the rooms where the user has joined.
|
||||
*
|
||||
* NodeInformationProvider will provide information about the rooms where the user has joined.
|
||||
*
|
||||
* @param node the node whose items will be provided by the NodeInformationProvider.
|
||||
* @param listener the NodeInformationProvider responsible for providing items related
|
||||
* to the node.
|
||||
|
|
@ -344,13 +344,13 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes the NodeInformationProvider responsible for providing information
|
||||
* Removes the NodeInformationProvider responsible for providing information
|
||||
* (ie items) related to a given node. This means that no more information will be
|
||||
* available for the specified node.
|
||||
*
|
||||
*
|
||||
* In MUC, a node could be 'http://jabber.org/protocol/muc#rooms' which means that the
|
||||
* NodeInformationProvider will provide information about the rooms where the user has joined.
|
||||
*
|
||||
* NodeInformationProvider will provide information about the rooms where the user has joined.
|
||||
*
|
||||
* @param node the node to remove the associated NodeInformationProvider.
|
||||
*/
|
||||
public void removeNodeInformationProvider(String node) {
|
||||
|
|
@ -362,7 +362,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* <p>
|
||||
* The result is a copied modifiable list of the original features.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* @return a List of the supported features by this XMPP entity.
|
||||
*/
|
||||
public synchronized List<String> getFeatures() {
|
||||
|
|
@ -370,7 +370,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Registers that a new feature is supported by this XMPP entity. When this client is
|
||||
* Registers that a new feature is supported by this XMPP entity. When this client is
|
||||
* queried for its information the registered features will be answered.<p>
|
||||
*
|
||||
* Since no stanza is actually sent to the server it is safe to perform this operation
|
||||
|
|
@ -436,7 +436,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Returns the data form that is set as extended information for this Service Discovery instance (XEP-0128).
|
||||
*
|
||||
*
|
||||
* @see <a href="http://xmpp.org/extensions/xep-0128.html">XEP-128: Service Discovery Extensions</a>
|
||||
* @return the data form
|
||||
*/
|
||||
|
|
@ -447,7 +447,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
/**
|
||||
* Returns the data form as List of PacketExtensions, or null if no data form is set.
|
||||
* This representation is needed by some classes (e.g. EntityCapsManager, NodeInformationProvider)
|
||||
*
|
||||
*
|
||||
* @return the data form as List of PacketExtensions
|
||||
*/
|
||||
public List<ExtensionElement> getExtendedInfoAsList() {
|
||||
|
|
@ -476,13 +476,13 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
/**
|
||||
* Returns the discovered information of a given XMPP entity addressed by its JID.
|
||||
* Use null as entityID to query the server
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity or null.
|
||||
* @return the discovered information.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public DiscoverInfo discoverInfo(Jid entityID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
if (entityID == null)
|
||||
|
|
@ -516,19 +516,19 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Returns the discovered information of a given XMPP entity addressed by its JID and
|
||||
* note attribute. Use this message only when trying to query information which is not
|
||||
* note attribute. Use this message only when trying to query information which is not
|
||||
* directly addressable.
|
||||
*
|
||||
*
|
||||
* @see <a href="http://xmpp.org/extensions/xep-0030.html#info-basic">XEP-30 Basic Protocol</a>
|
||||
* @see <a href="http://xmpp.org/extensions/xep-0030.html#info-nodes">XEP-30 Info Nodes</a>
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity.
|
||||
* @param node the optional attribute that supplements the 'jid' attribute.
|
||||
* @return the discovered information.
|
||||
* @throws XMPPErrorException if the operation failed for some reason.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public DiscoverInfo discoverInfo(Jid entityID, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
// Discover the entity's info
|
||||
|
|
@ -544,13 +544,13 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Returns the discovered items of a given XMPP entity addressed by its JID.
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity.
|
||||
* @return the discovered information.
|
||||
* @throws XMPPErrorException if the operation failed for some reason.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public DiscoverItems discoverItems(Jid entityID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return discoverItems(entityID, null);
|
||||
|
|
@ -558,16 +558,16 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Returns the discovered items of a given XMPP entity addressed by its JID and
|
||||
* note attribute. Use this message only when trying to query information which is not
|
||||
* note attribute. Use this message only when trying to query information which is not
|
||||
* directly addressable.
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity.
|
||||
* @param node the optional attribute that supplements the 'jid' attribute.
|
||||
* @return the discovered items.
|
||||
* @throws XMPPErrorException if the operation failed for some reason.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public DiscoverItems discoverItems(Jid entityID, String node) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
// Discover the entity's items
|
||||
|
|
@ -585,13 +585,13 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* to the server so that the server can provide items associated to the client. These items will
|
||||
* be returned by the server whenever the server receives a disco request targeted to the bare
|
||||
* address of the client (i.e. user@host.com).
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity.
|
||||
* @return true if the server supports publishing of items.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
@ -606,7 +606,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* to the server so that the server can provide items associated to the client. These items will
|
||||
* be returned by the server whenever the server receives a disco request targeted to the bare
|
||||
* address of the client (i.e. user@host.com).
|
||||
*
|
||||
*
|
||||
* @param info the discover info stanza to check.
|
||||
* @return true if the server supports publishing of items.
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
|
|
@ -618,17 +618,17 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Publishes new items to a parent entity. The item elements to publish MUST have at least
|
||||
* a 'jid' attribute specifying the Entity ID of the item, and an action attribute which
|
||||
* specifies the action being taken for that item. Possible action values are: "update" and
|
||||
* Publishes new items to a parent entity. The item elements to publish MUST have at least
|
||||
* a 'jid' attribute specifying the Entity ID of the item, and an action attribute which
|
||||
* specifies the action being taken for that item. Possible action values are: "update" and
|
||||
* "remove".
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity.
|
||||
* @param discoverItems the DiscoveryItems to publish.
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
@ -638,18 +638,18 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Publishes new items to a parent entity and node. The item elements to publish MUST have at
|
||||
* least a 'jid' attribute specifying the Entity ID of the item, and an action attribute which
|
||||
* specifies the action being taken for that item. Possible action values are: "update" and
|
||||
* Publishes new items to a parent entity and node. The item elements to publish MUST have at
|
||||
* least a 'jid' attribute specifying the Entity ID of the item, and an action attribute which
|
||||
* specifies the action being taken for that item. Possible action values are: "update" and
|
||||
* "remove".
|
||||
*
|
||||
*
|
||||
* @param entityID the address of the XMPP entity.
|
||||
* @param node the attribute that supplements the 'jid' attribute.
|
||||
* @param discoverItems the DiscoveryItems to publish.
|
||||
* @throws XMPPErrorException if the operation failed for some reason.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
|
|
@ -670,7 +670,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
* @since 4.1
|
||||
*/
|
||||
public boolean serverSupportsFeature(CharSequence feature) throws NoResponseException, XMPPErrorException,
|
||||
|
|
@ -730,10 +730,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @param jid the JID of the remote entity
|
||||
* @param feature
|
||||
* @return true if the entity supports the feature, false otherwise
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public boolean supportsFeature(Jid jid, CharSequence feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
return supportsFeatures(jid, feature);
|
||||
|
|
@ -762,7 +762,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Find all services under the users service that provide a given feature.
|
||||
*
|
||||
*
|
||||
* @param feature the feature to search for
|
||||
* @param stopOnFirst if true, stop searching after the first service was found
|
||||
* @param useCache if true, query a cache first to avoid network I/O
|
||||
|
|
@ -770,7 +770,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public List<DiscoverInfo> findServicesDiscoverInfo(String feature, boolean stopOnFirst, boolean useCache)
|
||||
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
|
|
@ -884,7 +884,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Find all services under the users service that provide a given feature.
|
||||
*
|
||||
*
|
||||
* @param feature the feature to search for
|
||||
* @param stopOnFirst if true, stop searching after the first service was found
|
||||
* @param useCache if true, query a cache first to avoid network I/O
|
||||
|
|
@ -892,7 +892,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public List<DomainBareJid> findServices(String feature, boolean stopOnFirst, boolean useCache) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
List<DiscoverInfo> services = findServicesDiscoverInfo(feature, stopOnFirst, useCache);
|
||||
|
|
@ -939,7 +939,7 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
|
||||
/**
|
||||
* Loads the ServiceDiscoveryManager with an EntityCapsManger that speeds up certain lookups.
|
||||
*
|
||||
*
|
||||
* @param manager
|
||||
*/
|
||||
public void setEntityCapsManager(EntityCapsManager manager) {
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
|||
import org.jxmpp.util.XmppStringUtils;
|
||||
|
||||
/**
|
||||
* A DiscoverInfo IQ packet, which is used by XMPP clients to request and receive information
|
||||
* to/from other XMPP entities.<p>
|
||||
*
|
||||
* The received information may contain one or more identities of the requested XMPP entity, and
|
||||
* A DiscoverInfo IQ packet, which is used by XMPP clients to request and receive information
|
||||
* to/from other XMPP entities.<p>
|
||||
*
|
||||
* The received information may contain one or more identities of the requested XMPP entity, and
|
||||
* a list of supported features by the requested XMPP entity.
|
||||
*
|
||||
* @author Gaston Dombiak
|
||||
|
|
@ -58,7 +58,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Copy constructor.
|
||||
*
|
||||
*
|
||||
* @param d
|
||||
*/
|
||||
public DiscoverInfo(DiscoverInfo d) {
|
||||
|
|
@ -120,7 +120,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Adds a new identity of the requested entity to the discovered information.
|
||||
*
|
||||
*
|
||||
* @param identity the discovered entity's identity
|
||||
*/
|
||||
public void addIdentity(Identity identity) {
|
||||
|
|
@ -130,7 +130,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Adds identities to the DiscoverInfo stanza.
|
||||
*
|
||||
*
|
||||
* @param identitiesToAdd
|
||||
*/
|
||||
public void addIdentities(Collection<Identity> identitiesToAdd) {
|
||||
|
|
@ -142,7 +142,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Returns the discovered identities of an XMPP entity.
|
||||
*
|
||||
*
|
||||
* @return an unmodifiable list of the discovered identities
|
||||
*/
|
||||
public List<Identity> getIdentities() {
|
||||
|
|
@ -179,10 +179,10 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* Returns the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* is not directly addressable.
|
||||
*
|
||||
* @return the node attribute that supplements the 'jid' attribute
|
||||
|
|
@ -192,12 +192,12 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* Sets the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* is not directly addressable.
|
||||
*
|
||||
*
|
||||
* @param node the node attribute that supplements the 'jid' attribute
|
||||
*/
|
||||
public void setNode(String node) {
|
||||
|
|
@ -206,7 +206,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Returns true if the specified feature is part of the discovered information.
|
||||
*
|
||||
*
|
||||
* @param feature the feature to check
|
||||
* @return true if the requests feature has been discovered
|
||||
*/
|
||||
|
|
@ -230,7 +230,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Test if a DiscoverInfo response contains duplicate identities.
|
||||
*
|
||||
*
|
||||
* @return true if duplicate identities where found, otherwise false
|
||||
*/
|
||||
public boolean containsDuplicateIdentities() {
|
||||
|
|
@ -247,7 +247,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Test if a DiscoverInfo response contains duplicate features.
|
||||
*
|
||||
*
|
||||
* @return true if duplicate identities where found, otherwise false
|
||||
*/
|
||||
public boolean containsDuplicateFeatures() {
|
||||
|
|
@ -262,11 +262,11 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
/**
|
||||
* Represents the identity of a given XMPP entity. An entity may have many identities but all
|
||||
* the identities SHOULD have the same name.<p>
|
||||
*
|
||||
*
|
||||
* Refer to <a href="http://www.jabber.org/registrar/disco-categories.html">Jabber::Registrar</a>
|
||||
* in order to get the official registry of values for the <i>category</i> and <i>type</i>
|
||||
* in order to get the official registry of values for the <i>category</i> and <i>type</i>
|
||||
* attributes.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static class Identity implements Comparable<Identity>, TypedCloneable<Identity> {
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Creates a new identity for an XMPP entity.
|
||||
*
|
||||
*
|
||||
* @param category the entity's category (required as per XEP-30).
|
||||
* @param type the entity's type (required as per XEP-30).
|
||||
*/
|
||||
|
|
@ -296,9 +296,9 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Creates a new identity for an XMPP entity.
|
||||
* 'category' and 'type' are required by
|
||||
* 'category' and 'type' are required by
|
||||
* <a href="http://xmpp.org/extensions/xep-0030.html#schemas">XEP-30 XML Schemas</a>
|
||||
*
|
||||
*
|
||||
* @param category the entity's category (required as per XEP-30).
|
||||
* @param name the entity's name.
|
||||
* @param type the entity's type (required as per XEP-30).
|
||||
|
|
@ -309,9 +309,9 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Creates a new identity for an XMPP entity.
|
||||
* 'category' and 'type' are required by
|
||||
* 'category' and 'type' are required by
|
||||
* <a href="http://xmpp.org/extensions/xep-0030.html#schemas">XEP-30 XML Schemas</a>
|
||||
*
|
||||
*
|
||||
* @param category the entity's category (required as per XEP-30).
|
||||
* @param type the entity's type (required as per XEP-30).
|
||||
* @param name the entity's name.
|
||||
|
|
@ -326,8 +326,8 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the entity's category. To get the official registry of values for the
|
||||
* 'category' attribute refer to <a href="http://www.jabber.org/registrar/disco-categories.html">Jabber::Registrar</a>
|
||||
* Returns the entity's category. To get the official registry of values for the
|
||||
* 'category' attribute refer to <a href="http://www.jabber.org/registrar/disco-categories.html">Jabber::Registrar</a>
|
||||
*
|
||||
* @return the entity's category.
|
||||
*/
|
||||
|
|
@ -345,8 +345,8 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the entity's type. To get the official registry of values for the
|
||||
* 'type' attribute refer to <a href="http://www.jabber.org/registrar/disco-categories.html">Jabber::Registrar</a>
|
||||
* Returns the entity's type. To get the official registry of values for the
|
||||
* 'type' attribute refer to <a href="http://www.jabber.org/registrar/disco-categories.html">Jabber::Registrar</a>
|
||||
*
|
||||
* @return the entity's type.
|
||||
*/
|
||||
|
|
@ -356,7 +356,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Returns the identities natural language if one is set.
|
||||
*
|
||||
*
|
||||
* @return the value of xml:lang of this Identity
|
||||
*/
|
||||
public String getLanguage() {
|
||||
|
|
@ -389,11 +389,11 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
return xml;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Check equality for Identity for category, type, lang and name
|
||||
* in that order as defined by
|
||||
* <a href="http://xmpp.org/extensions/xep-0115.html#ver-proc">XEP-0015 5.4 Processing Method (Step 3.3)</a>.
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
|
|
@ -434,7 +434,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
* Compares this identity with another one. The comparison order is: Category, Type, Lang.
|
||||
* If all three are identical the other Identity is considered equal. Name is not used for
|
||||
* comparison, as defined by XEP-0115
|
||||
*
|
||||
*
|
||||
* @param other
|
||||
* @return a negative integer, zero, or a positive integer as this object is less than,
|
||||
* equal to, or greater than the specified object.
|
||||
|
|
@ -473,8 +473,8 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Represents the features offered by the item. This information helps the requester to determine
|
||||
* what actions are possible with regard to this item (registration, search, join, etc.)
|
||||
* as well as specific feature types of interest, if any (e.g., for the purpose of feature
|
||||
* what actions are possible with regard to this item (registration, search, join, etc.)
|
||||
* as well as specific feature types of interest, if any (e.g., for the purpose of feature
|
||||
* negotiation).
|
||||
*/
|
||||
public static class Feature implements TypedCloneable<Feature> {
|
||||
|
|
@ -491,7 +491,7 @@ public class DiscoverInfo extends IQ implements TypedCloneable<DiscoverInfo> {
|
|||
|
||||
/**
|
||||
* Creates a new feature offered by an XMPP entity or item.
|
||||
*
|
||||
*
|
||||
* @param variable the feature's variable.
|
||||
*/
|
||||
public Feature(String variable) {
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
|||
import org.jxmpp.jid.Jid;
|
||||
|
||||
/**
|
||||
* A DiscoverItems IQ packet, which is used by XMPP clients to request and receive items
|
||||
* A DiscoverItems IQ packet, which is used by XMPP clients to request and receive items
|
||||
* associated with XMPP entities.<p>
|
||||
*
|
||||
* The items could also be queried in order to discover if they contain items inside. Some items
|
||||
*
|
||||
* The items could also be queried in order to discover if they contain items inside. Some items
|
||||
* may be addressable by its JID and others may require to be addressed by a JID and a node name.
|
||||
*
|
||||
* @author Gaston Dombiak
|
||||
|
|
@ -49,7 +49,7 @@ public class DiscoverItems extends IQ {
|
|||
|
||||
/**
|
||||
* Adds a new item to the discovered information.
|
||||
*
|
||||
*
|
||||
* @param item the discovered entity's item
|
||||
*/
|
||||
public void addItem(Item item) {
|
||||
|
|
@ -70,7 +70,7 @@ public class DiscoverItems extends IQ {
|
|||
|
||||
|
||||
/**
|
||||
* Returns the discovered items of the queried XMPP entity.
|
||||
* Returns the discovered items of the queried XMPP entity.
|
||||
*
|
||||
* @return an unmodifiable list of the discovered entity's items
|
||||
*/
|
||||
|
|
@ -79,10 +79,10 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* Returns the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* is not directly addressable.
|
||||
*
|
||||
* @return the node attribute that supplements the 'jid' attribute
|
||||
|
|
@ -92,12 +92,12 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* Sets the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* is not directly addressable.
|
||||
*
|
||||
*
|
||||
* @param node the node attribute that supplements the 'jid' attribute
|
||||
*/
|
||||
public void setNode(String node) {
|
||||
|
|
@ -117,11 +117,11 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* An item is associated with an XMPP Entity, usually thought of a children of the parent
|
||||
* entity and normally are addressable as a JID.<p>
|
||||
*
|
||||
* An item associated with an entity may not be addressable as a JID. In order to handle
|
||||
* such items, Service Discovery uses an optional 'node' attribute that supplements the
|
||||
* An item is associated with an XMPP Entity, usually thought of a children of the parent
|
||||
* entity and normally are addressable as a JID.<p>
|
||||
*
|
||||
* An item associated with an entity may not be addressable as a JID. In order to handle
|
||||
* such items, Service Discovery uses an optional 'node' attribute that supplements the
|
||||
* 'jid' attribute.
|
||||
*/
|
||||
public static class Item {
|
||||
|
|
@ -143,7 +143,7 @@ public class DiscoverItems extends IQ {
|
|||
|
||||
/**
|
||||
* Create a new Item associated with a given entity.
|
||||
*
|
||||
*
|
||||
* @param entityID the id of the entity that contains the item
|
||||
*/
|
||||
public Item(Jid entityID) {
|
||||
|
|
@ -178,10 +178,10 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* Returns the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* is not directly addressable.
|
||||
*
|
||||
* @return the node attribute that supplements the 'jid' attribute
|
||||
|
|
@ -191,12 +191,12 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* Sets the node attribute that supplements the 'jid' attribute. A node is merely
|
||||
* something that is associated with a JID and for which the JID can provide information.<p>
|
||||
*
|
||||
* Node attributes SHOULD be used only when trying to provide or query information which
|
||||
* is not directly addressable.
|
||||
*
|
||||
*
|
||||
* @param node the node attribute that supplements the 'jid' attribute
|
||||
*/
|
||||
public void setNode(String node) {
|
||||
|
|
@ -204,11 +204,11 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the action that specifies the action being taken for this item. Possible action
|
||||
* values are: "update" and "remove". Update should either create a new entry if the node
|
||||
* and jid combination does not already exist, or simply update an existing entry. If
|
||||
* Returns the action that specifies the action being taken for this item. Possible action
|
||||
* values are: "update" and "remove". Update should either create a new entry if the node
|
||||
* and jid combination does not already exist, or simply update an existing entry. If
|
||||
* "remove" is used as the action, the item should be removed from persistent storage.
|
||||
*
|
||||
*
|
||||
* @return the action being taken for this item
|
||||
*/
|
||||
public String getAction() {
|
||||
|
|
@ -216,11 +216,11 @@ public class DiscoverItems extends IQ {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the action that specifies the action being taken for this item. Possible action
|
||||
* values are: "update" and "remove". Update should either create a new entry if the node
|
||||
* and jid combination does not already exist, or simply update an existing entry. If
|
||||
* Sets the action that specifies the action being taken for this item. Possible action
|
||||
* values are: "update" and "remove". Update should either create a new entry if the node
|
||||
* and jid combination does not already exist, or simply update an existing entry. If
|
||||
* "remove" is used as the action, the item should be removed from persistent storage.
|
||||
*
|
||||
*
|
||||
* @param action the action being taken for this item
|
||||
*/
|
||||
public void setAction(String action) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue