|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Client
Represents a client - either a browser (Comet) client or a direct client using one of the thick client SDKs (e.g. .NET or Java).
| Method Summary | |
|---|---|
void |
disconnect()
Disconnects this client. |
Set<String> |
getSubscriptions()
Returns a list of every topic the client is currently subscribed to |
String |
getUid()
Returns a unique ID for each client |
boolean |
isConnected()
Whether this client is currently connected and capable of receiving messages |
void |
send(String topic,
Payload payload)
Sends a message to this client on a particular topic |
| Method Detail |
|---|
void send(String topic,
Payload payload)
Note the client does not need to be subscribed to topic but
they may choose to ignore the message if they are not. To send a
message to all subscribers of a topic use NIOServer.publish(String, Payload)
topic - the topic to send the message withpayload - the contents of the messageJsonPayload,
Payloadvoid disconnect()
boolean isConnected()
true if the client is currently connected, otherwise falseString getUid()
Set<String> getSubscriptions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||