Class jabberwerx.PEPNode
Extends
jabberwerx.PubSubNode.
Represents a PEP node.
This class provides the following events:
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
jabberwerx.PEPNode(jid, node, ctrl)
Creates a new PEPNode for the given JID, node, and PEPController. |
| Field Attributes | Field Name and Description |
|---|---|
| <static> <constant> |
jabberwerx.PEPNode.CURRENT_ITEM
An item ID used for simple single-item publishing. |
- Fields borrowed from class jabberwerx.PubSubNode:
- autoRetrieve
- Fields borrowed from class jabberwerx.Entity:
- features, identities, jid, node, properties
| Method Attributes | Method Name and Description |
|---|---|
|
createNode(cb)
Creates the node in the pub-sub service. |
|
|
deleteNode(cb)
Deletes the node in the pub-sub service. |
|
|
destroy()
Destroys this PEPNode. |
|
|
subscribe(cb)
Subscribes to this PEPNode. |
|
|
unsubscribe(cb)
Unsubscribes from this PEPNode. |
- Methods borrowed from class jabberwerx.PubSubNode:
- getDelegatedFor, getItems, publish, retract, retrieve
- Methods borrowed from class jabberwerx.Entity:
- apply, getAllPresence, getDisplayName, getGroups, getPrimaryPresence, getResourcePresence, hasFeature, hasIdentity, isActive, matches, remove, setDisplayName, setGroups, toString, update, updatePresence
- Methods borrowed from class jabberwerx.JWModel:
- applyEvent, event, shouldBeSavedWithGraph
- Methods borrowed from class jabberwerx.JWBase:
- extend, getClassName, graphUnserialized, init, intercept, invocation, mixin, shouldBeSerializedInline, wasUnserialized, willBeSerialized
Creates a new PEPNode for the given JID, node, and PEPController.
NOTE: This type should not be constructed directly. Instead, use jabberwerx.PEPController#node to obtain an instance.
- Parameters:
- {jabberwerx.JID} jid
- The JID
- {String} node
- The node
- {jabberwerx.PEPController|jabberwerx.PEPNode} ctrl
- The owning controller or delegate
- Throws:
- {TypeError}
- If {ctrl} is not valid; or if {node} is not valid
An item ID used for simple single-item publishing.
Creates the node in the pub-sub service. This implementation always throws a jabberwerx.util.NotSupportedError.
- Parameters:
- {Function} cb Optional
- The callback
- Throws:
- {jabberwerx.util.NotSupportedError}
- This method is not supported
Deletes the node in the pub-sub service. This implementation always throws a jabberwerx.util.NotSupportedError.
- Parameters:
- {Function} cb Optional
- The callback
- Throws:
- {jabberwerx.util.NotSupportedError}
- This method is not supported
Destroys this PEPNode. This method first unsubscribes then calls the superclass' implementation.
Subscribes to this PEPNode. This method performs an implicit
subscription by updating the capabilities to add the feature
"
The callback, if defined, is expected to match the following:
function callback(err) {
this; // this PubSubNode
err; // the stanza error if subscribe failed
}
- Parameters:
- {Function} cb Optional
- The callback
- Throws:
- {TypeError}
- If {cb} is defined and not a function
- See:
- #unsubscribe
Unsubscribes from this PEPNode. This method performs an implicit
unsubscription by updating the capabilities to remove the feature
"
The callback, if defined, is expected to match the following:
function callback(err) {
this; // this PubSubNode
err; // the stanza error if unsubscribe failed
}
- Parameters:
- {Function} cb Optional
- The callback
- Throws:
- {TypeError}
- If {cb} is defined and not a function
- See:
- #subscribe