|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Client
A Bayeux Client.
A client may subscribe to channels and publish messages to channels.
Client instances should not be directly created by uses, but should
be obtained via the Bayeux.getClient(String)
or Bayeux.newClient(String, Listener)
methods.
Three types of client may be represented by this interface:Bayeux.newClient(String, Listener)
method
Method Summary | |
---|---|
void |
deliver(Message message)
Deliver a message to this client only Deliver a message directly to the client. |
void |
deliver(Message[] message)
Deliver a batch of messages to this client only Deliver a batch messages directly to the client. |
void |
endBatch()
Ends a batch. since batches can be nested, messages will only be delivered after the endBatch has been called as many times as startBatch has. |
java.lang.String |
getId()
Returns a unique id for this client. |
boolean |
hasMessages()
Returns true if this client is holding messages to be delivered to the remote client. |
boolean |
isLocal()
|
void |
startBatch()
Starts a batch, no messages will be delivered until endBatch is called. |
Method Detail |
---|
java.lang.String getId()
boolean hasMessages()
void deliver(Message message)
message
- void deliver(Message[] message)
message
- boolean isLocal()
void startBatch()
void endBatch()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |