dojox.cometd
Interface Client

All Known Implementing Classes:
ClientImpl

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, Receiver) methods.


Method Summary
 void deliver(Client from, Map<String,Object> message)
          Deliver a message to the client Deliver a message directly to the client.
 String getId()
           
 Listener getListener()
           
 boolean hasMessages()
           
 boolean isLocal()
           
 void remove(boolean timeout)
           
 void setListener(Listener listener)
           
 Queue<Map<String,Object>> takeMessages()
          Take any messages queued for a client.
 

Method Detail

remove

void remove(boolean timeout)

getId

String getId()

hasMessages

boolean hasMessages()

takeMessages

Queue<Map<String,Object>> takeMessages()
Take any messages queued for a client.


deliver

void deliver(Client from,
             Map<String,Object> message)
Deliver a message to the client Deliver a message directly to the client. The message is not filtered or published to a channel.


setListener

void setListener(Listener listener)

getListener

Listener getListener()

isLocal

boolean isLocal()
Returns:
True if the client is local


Copyright © 2007 Mort Bay Consulting. All Rights Reserved.