public static interface MessagingControl.MessageHandler extends TopicTreeHandler
Such a handler may be registered for a branch of the topic tree using
addMessageHandler
.
Modifier and Type | Interface and Description |
---|---|
static class |
MessagingControl.MessageHandler.Default
Default implementation of
MessagingControl.MessageHandler . |
Modifier and Type | Method and Description |
---|---|
void |
onMessage(SessionId sessionId,
String topicPath,
Content content,
ReceiveContext context)
Receives messages sent from client sessions via a topic.
|
onActive, onClose
void onMessage(SessionId sessionId, String topicPath, Content content, ReceiveContext context)
The topic will be one subordinate to the branch for which the handler was registered.
sessionId
- identifies the client session that sent the messagetopicPath
- the topic path that the message was sent tocontent
- the message content sent by the client. If the content
is known to be of a certain data type
then
DataType.readValue(Bytes)
may be used to convert it.context
- receive context (including headers) associated with
the messageCopyright © 2016 Push Technology Ltd. All Rights Reserved.