Implements interfaces: wokkel.iwokkel.IPubSubClient

Publish subscribe client protocol.

Method connectionInitialized The XML stream has been initialized.
Method itemsReceived Called when an items notification has been received for a node.
Method deleteReceived Called when a deletion notification has been received for a node.
Method purgeReceived Called when a purge notification has been received for a node.
Method createNode Create a publish subscribe node.
Method deleteNode Delete a publish subscribe node.
Method subscribe Subscribe to a publish subscribe node.
Method unsubscribe Unsubscribe from a publish subscribe node.
Method publish Publish to a publish subscribe node.
Method items Retrieve previously published items from a publish subscribe node.
Method getOptions Get subscription options.
Method setOptions Set subscription options.
Method _onEvent Undocumented
Method _onEvent_items Undocumented
Method _onEvent_delete Undocumented
Method _onEvent_purge Undocumented

Inherited from XMPPHandler:

Method __init__ Undocumented
Method setHandlerParent Set the parent of the handler.
Method disownHandlerParent Remove the parent of the handler.
Method makeConnection A connection over the underlying transport of the XML stream has been established.
Method connectionMade Called after a connection has been established.
Method connectionLost The XML stream has been closed.
Method send Send data over the managed XML stream.
Method request Send an IQ request and track the response.
def connectionInitialized(self): (source)

The XML stream has been initialized.

Can be overridden to perform work after stream initialization, e.g. to set up observers and start exchanging XML stanzas.

def _onEvent(self, message): (source)
Undocumented
def _onEvent_items(self, sender, recipient, action, headers): (source)
Undocumented
def _onEvent_delete(self, sender, recipient, action, headers): (source)
Undocumented
def _onEvent_purge(self, sender, recipient, action, headers): (source)
Undocumented
def itemsReceived(self, event): (source)

Called when an items notification has been received for a node.

An item can be an element named item or retract. Respectively, they signal an item being published or retracted, optionally accompanied with an item identifier in the id attribute.

ParameterseventThe items event. (type: ItemsEvent)
def deleteReceived(self, event): (source)

Called when a deletion notification has been received for a node.

ParameterseventThe items event. (type: ItemsEvent)
def purgeReceived(self, event): (source)

Called when a purge notification has been received for a node.

Upon receiving this notification all items associated should be considered retracted.

ParameterseventThe items event. (type: ItemsEvent)
def createNode(self, service, nodeIdentifier=None, options=None, sender=None): (source)

Create a publish subscribe node.

ParametersserviceThe publish subscribe service to create the node at. (type: JID)
nodeIdentifierOptional suggestion for the id of the node. (type: unicode)
optionsOptional node configuration options. (type: dict)
def deleteNode(self, service, nodeIdentifier, sender=None): (source)

Delete a publish subscribe node.

ParametersserviceThe publish subscribe service to delete the node from. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
def subscribe(self, service, nodeIdentifier, subscriber, options=None, sender=None): (source)

Subscribe to a publish subscribe node.

ParametersserviceThe publish subscribe service that keeps the node. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
subscriberThe entity to subscribe to the node. This entity will get notifications of new published items. (type: JID)
optionsSubscription options. (type: dict)
ReturnsDeferred that fires with Subscription or errbacks with SubscriptionPending or SubscriptionUnconfigured. (type: defer.Deferred)
def unsubscribe(self, service, nodeIdentifier, subscriber, subscriptionIdentifier=None, sender=None): (source)

Unsubscribe from a publish subscribe node.

ParametersserviceThe publish subscribe service that keeps the node. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
subscriberThe entity to unsubscribe from the node. (type: JID)
subscriptionIdentifierOptional subscription identifier. (type: unicode)
def publish(self, service, nodeIdentifier, items=None, sender=None): (source)

Publish to a publish subscribe node.

ParametersserviceThe publish subscribe service that keeps the node. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
itemsOptional list of Items to publish. (type: list)
def items(self, service, nodeIdentifier, maxItems=None, subscriptionIdentifier=None, sender=None, itemIdentifiers=None): (source)

Retrieve previously published items from a publish subscribe node.

ParametersserviceThe publish subscribe service that keeps the node. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
maxItemsOptional limit on the number of retrieved items. (type: int)
subscriptionIdentifierOptional subscription identifier. In case the node has been subscribed to multiple times, this narrows the results to the specific subscription. (type: unicode)
itemIdentifiersIdentifiers of the items to be retrieved. (type: set of unicode)
def getOptions(self, service, nodeIdentifier, subscriber, subscriptionIdentifier=None, sender=None): (source)

Get subscription options.

ParametersserviceThe publish subscribe service that keeps the node. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
subscriberThe entity subscribed to the node. (type: JID)
subscriptionIdentifierOptional subscription identifier. (type: unicode)
Returns (type: data_form.Form)
def setOptions(self, service, nodeIdentifier, subscriber, options, subscriptionIdentifier=None, sender=None): (source)

Set subscription options.

ParametersserviceThe publish subscribe service that keeps the node. (type: JID)
nodeIdentifierThe identifier of the node. (type: unicode)
subscriberThe entity subscribed to the node. (type: JID)
optionsSubscription options. (type: dict.)
subscriptionIdentifierOptional subscription identifier. (type: unicode)
API Documentation for wokkel, generated by pydoctor at 2018-12-06 14:45:46.