Class MessageReceiverDefault
Default implementation of IMessageHandler that simply logs the inbound content.
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Topics
Assembly: Diffusion.Client.dll
Syntax
public class MessageReceiverDefault : object, IMessageHandler, ITopicTreeHandler
Remarks
Deprecated: This is only used within one-way messaging, which is deprecated from this release. This interface will be removed in a future release.
Methods
OnActive(String, IRegisteredHandler)
Called when the handler has been registered at the server and is now active.
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, registeredHandler will be closed, and the session error handler will be notified. To change the handler, first close the previous handler.
Declaration
public virtual void OnActive(string topicPath, IRegisteredHandler registeredHandler)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath | The path that the handler is active for. |
IRegisteredHandler | registeredHandler | Allows the handler to be closed. |
OnClose(String)
Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.
Declaration
public virtual void OnClose(string topicPath)
Parameters
Type | Name | Description |
---|---|---|
String | topicPath |
OnMessage(ISessionId, String, IContent, IReceiveContext)
Receives content sent from a session through a topic.
Declaration
public virtual void OnMessage(ISessionId sessionId, string topicPath, IContent content, IReceiveContext context)
Parameters
Type | Name | Description |
---|---|---|
ISessionId | sessionId | Identifies the client session that sent the content. |
String | topicPath | The path of the topic that the content was sent on. |
IContent | content | The content sent by the client. |
IReceiveContext | context | The context associated with the content. |