C# 클래스 Examples.ControlClientUsingFiltersAndProperties.BroadcastHandler

상속: IMessageHandler
파일 보기 프로젝트 열기: pushtechnology/diffusion-examples

공개 메소드들

메소드 설명
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