org.mortbay.cometd
Class ClientImpl
java.lang.Object
org.mortbay.cometd.ClientImpl
- All Implemented Interfaces:
- org.cometd.Client
- Direct Known Subclasses:
- ContinuationClient
public class ClientImpl
- extends java.lang.Object
- implements org.cometd.Client
- Author:
- gregw
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_bayeux
protected AbstractBayeux _bayeux
ClientImpl
protected ClientImpl(AbstractBayeux bayeux)
ClientImpl
protected ClientImpl(AbstractBayeux bayeux,
java.lang.String idPrefix)
deliver
public void deliver(org.cometd.Client from,
java.lang.String toChannel,
java.lang.Object data,
java.lang.String id)
- Specified by:
deliver
in interface org.cometd.Client
doDelivery
protected void doDelivery(org.cometd.Client from,
org.cometd.Message message)
doDeliverListeners
public void doDeliverListeners()
startBatch
public void startBatch()
- Specified by:
startBatch
in interface org.cometd.Client
endBatch
public void endBatch()
- Specified by:
endBatch
in interface org.cometd.Client
getConnectionType
public java.lang.String getConnectionType()
getId
public java.lang.String getId()
- Specified by:
getId
in interface org.cometd.Client
hasMessages
public boolean hasMessages()
- Specified by:
hasMessages
in interface org.cometd.Client
isJSONCommented
public boolean isJSONCommented()
- Returns:
- the commented
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interface org.cometd.Client
remove
public void remove(boolean timeout)
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
getMessages
public int getMessages()
takeMessages
public java.util.List<org.cometd.Message> takeMessages()
- Specified by:
takeMessages
in interface org.cometd.Client
returnMessages
public void returnMessages(java.util.List<org.cometd.Message> messages)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
addSubscription
protected void addSubscription(ChannelImpl channel)
removeSubscription
protected void removeSubscription(ChannelImpl channel)
setConnectionType
protected void setConnectionType(java.lang.String type)
setId
protected void setId(java.lang.String _id)
unsubscribeAll
protected void unsubscribeAll()
setBrowserId
public void setBrowserId(java.lang.String id)
getBrowserId
public java.lang.String getBrowserId()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
getAdvice
public JSON.Literal getAdvice()
- Get the advice specific for this Client
- Returns:
- advice specific for this client or null
setAdvice
public void setAdvice(JSON.Literal advice)
- Parameters:
advice
- specific for this client
addListener
public void addListener(org.cometd.ClientListener listener)
- Specified by:
addListener
in interface org.cometd.Client
removeListener
public void removeListener(org.cometd.ClientListener listener)
- Specified by:
removeListener
in interface org.cometd.Client
getTimeout
public long getTimeout()
setTimeout
public void setTimeout(long timeoutMS)
setMaxQueue
public void setMaxQueue(int maxQueue)
- Specified by:
setMaxQueue
in interface org.cometd.Client
getMaxQueue
public int getMaxQueue()
- Specified by:
getMaxQueue
in interface org.cometd.Client
getQueue
public java.util.Queue<org.cometd.Message> getQueue()
- Specified by:
getQueue
in interface org.cometd.Client
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.