Known implementations: wokkel.pubsub.PubSubResource

No interface docstring
Method locateResource Locate a resource that will handle the request.
Method getInfo Get node type and meta data.
Method getNodes Get all nodes contained by this node.
Method getConfigurationOptions Retrieve all known node configuration options.
Method publish Called when a publish request has been received.
Method subscribe Called when a subscribe request has been received.
Method unsubscribe Called when a subscribe request has been received.
Method subscriptions Called when a subscriptions retrieval request has been received.
Method affiliations Called when a affiliations retrieval request has been received.
Method create Called when a node creation request has been received.
Method default Called when a default node configuration request has been received.
Method configureGet Called when a node configuration retrieval request has been received.
Method configureSet Called when a node configuration change request has been received.
Method items Called when a items retrieval request has been received.
Method retract Called when a item retraction request has been received.
Method purge Called when a node purge request has been received.
Method delete Called when a node deletion request has been received.
Method affiliationsGet Called when an owner affiliations retrieval request been received.
Method affiliationsSet Called when a affiliations modify request has been received.
def locateResource(request): (source)

Locate a resource that will handle the request.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
def getInfo(requestor, service, nodeIdentifier): (source)

Get node type and meta data.

ParametersrequestorThe entity the request originated from. (type: JID)
serviceThe publish-subscribe service entity. (type: JID)
nodeIdentifierIdentifier of the node to request the info for. (type: unicode)
ReturnsA deferred that fires with a dictionary. If not empty, it must have the keys 'type' and 'meta-data' to keep respectively the node type and a dictionary with the meta data for that node. (type: Deferred)
def getNodes(requestor, service, nodeIdentifier): (source)

Get all nodes contained by this node.

ParametersrequestorThe entity the request originated from. (type: JID)
serviceThe publish-subscribe service entity. (type: JID)
nodeIdentifierIdentifier of the node to request the childs for. (type: unicode)
ReturnsA deferred that fires with a list of child node identifiers. (type: Deferred)
def getConfigurationOptions(): (source)

Retrieve all known node configuration options.

The returned dictionary holds the possible node configuration options by option name. The value of each entry represents the specifics for that option in a dictionary:

  • 'type' (str): The option's type (see Field's doc string for possible values).
  • 'label' (unicode): A human readable label for this option.
  • 'options' (dict): Optional list of possible values for this option.

Example:

   {
   "pubsub#persist_items":
       {"type": "boolean",
        "label": "Persist items to storage"},
   "pubsub#deliver_payloads":
       {"type": "boolean",
        "label": "Deliver payloads with event notifications"},
   "pubsub#send_last_published_item":
       {"type": "list-single",
        "label": "When to send the last published item",
        "options": {
            "never": "Never",
            "on_sub": "When a new subscription is processed"}
       }
   }
Returns (type: dict.)
def publish(request): (source)

Called when a publish request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
Returnsdeferred that fires on success. (type: Deferred)
def subscribe(request): (source)

Called when a subscribe request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a Subscription. (type: Deferred)
def unsubscribe(request): (source)

Called when a subscribe request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with None when unsubscription has succeeded. (type: Deferred)
def subscriptions(request): (source)

Called when a subscriptions retrieval request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a list of subscriptions as Subscription. (type: Deferred)
def affiliations(request): (source)

Called when a affiliations retrieval request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a list of affiliations as tuples of (node identifier as unicode, affiliation state as str). The affiliation can be 'owner', 'publisher', or 'outcast'. (type: Deferred)
def create(request): (source)

Called when a node creation request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a unicode that represents the identifier of the new node. (type: Deferred)
def default(request): (source)

Called when a default node configuration request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a dict representing the default node configuration. Keys are strs that represent the field name. Values can be of types unicode, int or bool. (type: Deferred)
def configureGet(request): (source)

Called when a node configuration retrieval request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a dict representing the node configuration. Keys are strs that represent the field name. Values can be of types unicode, int or bool. (type: Deferred)
def configureSet(request): (source)

Called when a node configuration change request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with None when the node's configuration has been changed. (type: Deferred)
def items(request): (source)

Called when a items retrieval request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a list of pubsub.Item. (type: Deferred)
def retract(request): (source)

Called when a item retraction request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with None when the given items have been retracted. (type: Deferred)
def purge(request): (source)

Called when a node purge request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with None when the node has been purged. (type: Deferred)
def delete(request): (source)

Called when a node deletion request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with None when the node has been deleted. (type: Deferred)
def affiliationsGet(request): (source)

Called when an owner affiliations retrieval request been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with a dict of affiliations with the entity as key (JID) and the affiliation state as value (unicode). The affiliation can be u'owner', u'publisher', or u'outcast'. (type: Deferred)
NoteAffiliations are always on the bare JID. An implementation of this method MUST NOT return JIDs with a resource part.
def affiliationsSet(request): (source)

Called when a affiliations modify request has been received.

ParametersrequestThe publish-subscribe request. (type: wokkel.pubsub.PubSubRequest)
ReturnsA deferred that fires with None when the affiliation changes were succesfully processed.. (type: Deferred)
NoteAffiliations are always on the bare JID. The JIDs in wokkel.pubsub.PubSubRequest's affiliations attribute are already stripped of any resource.
API Documentation for wokkel, generated by pydoctor at 2018-12-06 14:45:46.