|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Publisher
A Publisher allows you to publish to all subscribed clients on a particular topic. Only clients who are connected and subscribed to topic will receive the payload.
| Method Summary | |
|---|---|
void |
publish(String topic,
Payload payload)
Sends the payload to all clients who are subscribed to topic. |
| Method Detail |
|---|
void publish(String topic,
Payload payload)
NIOServer.
This method should generally be preferred over Client.send(String, Payload)
except where unique information must be sent to each client.
StreamHub keeps its own internal map of subscriptions. If you need
to send something on a topic which a client has not subscribed to, use
Client.send(String, Payload).
topic - the topic on which to send the messagepayload - the message payloadPayload
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||