org.mortbay.cometd
Class ClientImpl
java.lang.Object
org.mortbay.cometd.ClientImpl
- All Implemented Interfaces:
- Client
public class ClientImpl
- extends Object
- implements Client
- Author:
- gregw
_bayeux
protected AbstractBayeux _bayeux
ClientImpl
protected ClientImpl(AbstractBayeux bayeux,
String idPrefix,
Listener listener)
connect
public ChannelImpl connect()
- Connect the client.
- Returns:
- the meta Channel for the connection
deliver
public void deliver(Client from,
Map<String,Object> message)
- Description copied from interface:
Client
- Deliver a message to the client
Deliver a message directly to the client. The message is not
filtered or published to a channel.
- Specified by:
deliver
in interface Client
getConnection
public ChannelImpl getConnection()
- Returns:
- the meta Channel for the connection or null if not connected.
getConnectionType
public String getConnectionType()
getId
public String getId()
- Specified by:
getId
in interface Client
hasMessages
public boolean hasMessages()
- Specified by:
hasMessages
in interface Client
isJSONCommented
public boolean isJSONCommented()
- Returns:
- the commented
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interface Client
- Returns:
- True if the client is local
remove
public void remove(boolean timeout)
- Specified by:
remove
in interface Client
responded
public int responded()
responsePending
public int responsePending()
resume
public void resume()
- Called by deliver to resume anything waiting on this client.
setJSONCommented
public void setJSONCommented(boolean commented)
- Parameters:
commented
- the commented to set
setListener
public void setListener(Listener listener)
- Specified by:
setListener
in interface Client
getListener
public Listener getListener()
- Specified by:
getListener
in interface Client
takeMessages
public Queue<Map<String,Object>> takeMessages()
- Description copied from interface:
Client
- Take any messages queued for a client.
- Specified by:
takeMessages
in interface Client
toString
public String toString()
- Overrides:
toString
in class Object
addSubscription
protected void addSubscription(ChannelImpl channel)
removeSubscription
protected void removeSubscription(ChannelImpl channel)
setConnectionType
protected void setConnectionType(String type)
setId
protected void setId(String _id)
unsubscribeAll
protected void unsubscribeAll()
setBrowserId
public void setBrowserId(String id)
getBrowserId
public String getBrowserId()
onBrowser
public int onBrowser(String browserId)
Copyright © 2007 Mort Bay Consulting. All Rights Reserved.