Class jabberwerx.DiscoController
Extends
jabberwerx.Controller.
Controller class for collecting disco info on the nodes.
This class provides the following events:
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.DiscoController(client)
Creates a new DiscoController with the given client. |
Field Attributes | Field Name and Description |
---|---|
Number of seconds before iq requests time out.
|
- Fields borrowed from class jabberwerx.Controller:
- client, name
Method Attributes | Method Name and Description |
---|---|
cleanupEntity(entity)
Cleanup given entity on behalf of the client entity cache jabberwerx.EntitySet. |
|
destroy()
Destroys disco controller and removes any event callbacks it registered. |
|
fetchInfo(jid, node, cb)
Sends out a disco#info request to the given jid/node combination and returns the results to the provided callback. |
|
findByFeature(feature)
Finds all entities with given feature. |
|
findByIdentity(identity)
Finds all entities with given identity. |
|
startRendezvous(ctx)
|
- Methods borrowed from class jabberwerx.Controller:
- removeEntity, updateEntity
- Methods borrowed from class jabberwerx.JWModel:
- applyEvent, event, shouldBeSavedWithGraph
- Methods borrowed from class jabberwerx.JWBase:
- getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString, wasUnserialized, willBeSerialized
Creates a new DiscoController with the given client.
- Parameters:
- {jabberwerx.Client} client
- The client object to use for communicating to the server
- Throws:
- {TypeError}
- If {client} is not an instance of jabberwerx.Client
Cleanup given entity on behalf of the client entity cache jabberwerx.EntitySet.
- Parameters:
- {jabberwerx.Server} entity
- The entity to destroy
Destroys disco controller and removes any event callbacks it registered.
Sends out a disco#info request to the given jid/node combination and returns the results to the provided callback.
- Parameters:
- {jabberwerx.JID|String} jid
- The target JID for the disco#info request.
- {String} node Optional
- The optional node associated with the JID.
- {Function} cb
- The callback executed when the disco#info request returns or times out.
- Throws:
- {TypeError}
- if cb is not a function
- {TypeError}
- if node is not a String
Finds all entities with given feature.
- Parameters:
- {String} feature
- Feature for which to find entities.
- Throws:
- {TypeError}
- If DiscoController has not finished initializing.
- Returns:
- {jabberwerx.Entity[]} which contain the given feature.
Finds all entities with given identity.
- Parameters:
- {String} identity
- Identity for which to find entities.
- Throws:
- {TypeError}
- If DiscoController has not finished initializing.
- Returns:
- {jabberwerx.Entity[]} which contain the given identity.
- Parameters:
- ctx