Class TopicControlEventListenerDefault
Abstract implementation of ITopicControlTopicEventListener, may be extended to provide the OnHasSubscribers(String) and OnNoSubscribers(String) methods.
Inherited Members
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Topics
Assembly: Diffusion.Client.dll
Syntax
public abstract class TopicControlEventListenerDefault : TopicTreeHandlerDefault, ITopicTreeHandler, ITopicControlTopicEventListener, ITopicTreeHandler
Methods
OnError(String, ErrorReason)
Notification of a contextual error related to this handler. This is
analogous to an exception being raised. Situations in which
OnError
is called include the session being closed before the
handler is registered, a communication timeout, or a problem with the
provided parameters. No further calls will be made to this handler.
Declaration
public virtual void OnError(string topicPath, ErrorReason errorReason)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | the branch of the topic tree for which the handler was registered |
ErrorReason | errorReason | a value representing the error; this can be one of constants defined in ErrorReason, or a feature-specific reason |
OnHasSubscribers(String)
A topic that previously had no subscribers now has at least one.
Declaration
public virtual void OnHasSubscribers(string topicPath)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath |
OnNoSubscribers(String)
A topic that previously had some subscribers now has none.
Declaration
public virtual void OnNoSubscribers(string topicPath)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath |
OnRegistered(String, IRegistration)
Called when the handler has been successfully registered with the server.
A session can register a single handler of each type for a given branch
of the topic tree. If there is already a handler registered for the topic
path the operation will fail, registration
will be closed,
and the session error handler will be notified. To change the handler,
first
Declaration
public virtual void OnRegistered(string topicPath, IRegistration registration)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | the path that the handler is active for |
IRegistration | registration | allows the handler to be closed |