Diffusion Apple API  6.5.2
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
Instance Methods | List of all members
<PTDiffusionMissingTopicHandler> Protocol Reference


Handler called when a client session subscribes or fetches using a topic selector that matches no topics.

See Also
Inheritance diagram for <PTDiffusionMissingTopicHandler>:

Instance Methods

(void) - diffusionTopicTreeRegistration:hadMissingTopicNotification:
- Instance Methods inherited from <PTDiffusionTopicTreeRegistrationDelegate>
(void) - diffusionTopicTreeRegistrationDidClose:
(void) - diffusionTopicTreeRegistration:didFailWithError:

Method Documentation

- (void) diffusionTopicTreeRegistration: (PTDiffusionTopicTreeRegistration *)  registration
hadMissingTopicNotification: (PTDiffusionMissingTopicNotification *)  notification 

Called when a client session requests a topic that does not exist, and the topic path belongs to part of the topic tree for which this handler was registered.

The handler implementation should take the appropriate action (for example, create the topic), and then call proceed on the supplied notification. This allows the client request to continue and successfully resolve against the topic if it was created.

Alternatively, the handler can call cancel to discard the request. A handler should always call proceed or cancel, otherwise resources will continue to be reserved on the server and the client's request will not complete.

registrationThe topic tree registration for which this handler applies.
notificationThe missing topic notification, providing proceed and cancel methods to be used as required.