C# Класс Examples.ControlClientUsingFiltersAndProperties.BroadcastHandler

Наследование: IMessageHandler
Показать файл Открыть проект

Открытые методы

Метод Описание
BroadcastHandler ( IMessagingControl messagingControl, ISendToFilterCallback callback ) : System.Linq

Constructor.

OnActive ( string topicPath, IRegisteredHandler registeredHandler ) : void

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, registeredHandler will be closed, and the session error handler will be notified. To change the handler, first close the previous handler.

OnClose ( string topicPath ) : void

Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.

OnMessage ( SessionId sessionId, string topicPath, IContent content, IReceiveContext context ) : void

Receives content sent from a session via a topic.

Описание методов

BroadcastHandler() публичный Метод

Constructor.
public BroadcastHandler ( IMessagingControl messagingControl, ISendToFilterCallback callback ) : System.Linq
messagingControl IMessagingControl The messaging control object.
callback ISendToFilterCallback The filter callback.
Результат System.Linq

OnActive() публичный Метод

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, registeredHandler will be closed, and the session error handler will be notified. To change the handler, first close the previous handler.
public OnActive ( string topicPath, IRegisteredHandler registeredHandler ) : void
topicPath string The path that the handler is active for.
registeredHandler IRegisteredHandler Allows the handler to be closed.
Результат void

OnClose() публичный Метод

Called if the handler is closed. This happens if the call to register the handler fails, or the handler is unregistered.
public OnClose ( string topicPath ) : void
topicPath string The branch of the topic tree for which the handler was registered.
Результат void

OnMessage() публичный Метод

Receives content sent from a session via a topic.
public OnMessage ( SessionId sessionId, string topicPath, IContent content, IReceiveContext context ) : void
sessionId SessionId Identifies the client session that sent the content.
topicPath string The path of the topic that the content was sent on.
content IContent The content sent by the client.
context IReceiveContext The context associated with the content.
Результат void