StropheCappuccino API 1.0.0
TNPubSubController Class Reference

#import <TNPubSubController.h>

List of all members.

Public Member Functions

(BOOL) - containsServerJID: [implementation]
(id) - delegate [implementation]
(TNPubSubNode- findOrCreateNodeWithName:server: [implementation]
(TNPubSubNode- initWithConnection:pubSubServer: [implementation]
(CPArray) - nodes [implementation]
(TNPubSubNode- nodeWithName: [implementation]
(TNPubSubNode- nodeWithName:server: [implementation]
(void) - retrieveSubscriptions [implementation]
(CPArray) - servers [implementation]
(void) - setDelegate: [implementation]
(void) - setServers: [implementation]
(CPString) - subscribeToNodesWithNames:nodesDelegate: [implementation]
(TNPubSubNode- subscribeToNodeWithName:server: [implementation]
(TNPubSubNode- subscribeToNodeWithName:server:nodeDelegate: [implementation]
(void) - unsubscribeFromAllNodes [implementation]
(CPString) - unsubscribeFromNodesWithNames:nodesDelegate: [implementation]
(TNPubSubNode- unsubscribeFromNodeWithName:server: [implementation]
(TNPubSubNode- unsubscribeFromNodeWithName:server:nodeDelegate: [implementation]

Static Public Member Functions

(TNPubSubNode+ pubSubControllerWithConnection: [implementation]
(TNPubSubNode+ pubSubControllerWithConnection:pubSubServer: [implementation]

Detailed Description

this is an implementation of a XMPP Publish-Subscribe controller

Definition at line 2 of file TNPubSubController.h.


Member Function Documentation

- (BOOL) containsServerJID: (TNStropheJID aServerJID [implementation]

returns YES is server list contains a given server

Parameters:
aServerJIDthe server to search
Returns:
YES if aServerJID is already in list

Definition at line 151 of file TNPubSubController.j.

- (id) delegate [implementation]

Synthesized accessor method.

Definition at line 438 of file TNPubSubController.j.

- (TNPubSubNode) findOrCreateNodeWithName: (CPString)  aNodeName
server: (TNStropheJID aServer 
[implementation]

returns the node with given name, or initialize a new one if not it not exists

Parameters:
aNodeNamethe name of the node
aServerthe server of the node if nil, will return the first matching node with name
Returns:
the TNPubSubNode with given name or new one if not found

Definition at line 191 of file TNPubSubController.j.

- (TNPubSubNode) initWithConnection: (TNStropheConnection aConnection
pubSubServer: (TNStropheJID aPubSubServer 
[implementation]

initialize and return a new TNPubSubController

Parameters:
aConnectionthe TNStropheConnection to use to communicate
aPubSubServera pubsubserver. if nil, it will be pubsub. + domain of [_connection JID]
Returns:
initialized TNPubSubController

Definition at line 76 of file TNPubSubController.j.

- (CPArray) nodes [implementation]

Synthesized accessor method.

Definition at line 414 of file TNPubSubController.j.

- (TNPubSubNode) nodeWithName: (CPString)  aNodeName [implementation]

returns the node with given name, or null if not it not exists

Parameters:
aNodeNamethe name of the node
Returns:
the TNPubSubNode with given name or nil

Definition at line 181 of file TNPubSubController.j.

- (TNPubSubNode) nodeWithName: (CPString)  aNodeName
server: (TNStropheJID aServer 
[implementation]

returns the node with given name, or null if not it not exists

Parameters:
aNodeNamethe name of the node
aServerthe server of the node if nil, will return the first matching node with name
Returns:
the TNPubSubNode with given name or nil

Definition at line 164 of file TNPubSubController.j.

+ (TNPubSubNode) pubSubControllerWithConnection: (TNStropheConnection aConnection [implementation]

create and initialize and return a new TNPubSubController

Parameters:
aConnectionthe TNStropheConnection to use to communicate
Returns:
initialized TNPubSubController

Definition at line 62 of file TNPubSubController.j.

+ (TNPubSubNode) pubSubControllerWithConnection: (TNStropheConnection aConnection
pubSubServer: (CPString)  aPubSubServer 
[implementation]

create and initialize and return a new TNPubSubController

Parameters:
aConnectionthe TNStropheConnection to use to communicate
aPubSubServera pubsubserver. if nil, it will be pubsub. + domain of [_connection JID]
Returns:
initialized TNPubSubController

Definition at line 53 of file TNPubSubController.j.

- (void) retrieveSubscriptions [implementation]

retrieve all the subscription of the user from all given servers

Definition at line 212 of file TNPubSubController.j.

- (CPArray) servers [implementation]

Synthesized accessor method.

Definition at line 422 of file TNPubSubController.j.

- (void) setDelegate: (id)  aValue [implementation]

Synthesized accessor method.

Definition at line 446 of file TNPubSubController.j.

- (void) setServers: (CPArray)  aValue [implementation]

Synthesized accessor method.

Definition at line 430 of file TNPubSubController.j.

- (CPString) subscribeToNodesWithNames: (CPDictionary)  someNodes
nodesDelegate: (id)  aDelegate 
[implementation]

batch subscribe to nodes

Parameters:
someNodesa CPDictionnary servers as key, and CPArray of node names as values posts TNStrophePubSubBatchSubscribeCompleteNotification when all nodes have been subscribed
Returns:
batchID an ID for this batch used to establish the relevance of completion notification

Definition at line 312 of file TNPubSubController.j.

- (TNPubSubNode) subscribeToNodeWithName: (CPString)  aNodeName
server: (TNStropheJID aServer 
[implementation]

subscribe to a node with given name from given server

Parameters:
aNodeNamethe name of the node to subscribe
aServerthe server where is located the node

Definition at line 302 of file TNPubSubController.j.

- (TNPubSubNode) subscribeToNodeWithName: (CPString)  aNodeName
server: (TNStropheJID aServer
nodeDelegate: (id)  nodeDelegate 
[implementation]

subscribe to a node with given name from given server with given delegate

Parameters:
aNodeNamethe name of the node to subscribe
aServerthe server where is located the node
nodeDelegatethe delegate that'll be assigned to the node

Definition at line 288 of file TNPubSubController.j.

- (void) unsubscribeFromAllNodes [implementation]

unsubscribe from all nodes

Definition at line 400 of file TNPubSubController.j.

- (CPString) unsubscribeFromNodesWithNames: (CPDictionary)  someNodes
nodesDelegate: (id)  aDelegate 
[implementation]

batch unsubscribe to nodes

Parameters:
someNodesa CPDictionnary servers as key, and CPArray of node names as values posts TNStrophePubSubBatchSubscribeCompleteNotification when all nodes have been subscribed
Returns:
batchID an ID for this batch used to establish the relevance of completion notification

Definition at line 370 of file TNPubSubController.j.

- (TNPubSubNode) unsubscribeFromNodeWithName: (CPString)  aNodeName
server: (TNStropheJID aServer 
[implementation]

unsubscribe from a node with given name from given server

Parameters:
aNodeNamethe name of the node to subscribe
aServerthe server where is located the node

Definition at line 360 of file TNPubSubController.j.

- (TNPubSubNode) unsubscribeFromNodeWithName: (CPString)  aNodeName
server: (TNStropheJID aServer
nodeDelegate: (id)  nodeDelegate 
[implementation]

unsubscribe from a node with given name from given server with given delegate

Parameters:
aNodeNamethe name of the node to unsubscribe
aServerthe server where is located the node
nodeDelegatethe delegate that'll be assigned to the node

Definition at line 345 of file TNPubSubController.j.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables