org.mortbay.cometd
Class ClientImpl

java.lang.Object
  extended by org.mortbay.cometd.ClientImpl
All Implemented Interfaces:
dojox.cometd.Client
Direct Known Subclasses:
ContinuationClient

public class ClientImpl
extends Object
implements dojox.cometd.Client

Author:
gregw

Field Summary
protected  AbstractBayeux _bayeux
           
 
Constructor Summary
protected ClientImpl(AbstractBayeux bayeux)
           
protected ClientImpl(AbstractBayeux bayeux, String idPrefix)
           
protected ClientImpl(AbstractBayeux bayeux, String idPrefix, dojox.cometd.Listener listener)
          Deprecated.  
 
Method Summary
 void addListener(EventListener listener)
           
protected  void addSubscription(ChannelImpl channel)
           
 void deliver(dojox.cometd.Client from, dojox.cometd.Message message)
          Deprecated. use deliver(Client, String, Object, String)
 void deliver(dojox.cometd.Client from, String toChannel, Object data, String id)
           
protected  void doDelivery(dojox.cometd.Client from, dojox.cometd.Message message)
           
 void endBatch()
           
 boolean equals(Object o)
           
 int getAdviceVersion()
           
 String getBrowserId()
           
 String getConnectionType()
           
 String getId()
           
 dojox.cometd.Listener getListener()
           
 int getMessages()
           
 long getTimeout()
           
 boolean hasMessages()
           
 boolean isJSONCommented()
           
 boolean isLocal()
           
 void publish(String toChannel, Object data, String msgId)
          Deprecated. use Channel#publish(Client, Object, String)
 void remove(boolean timeout)
           
 void removeListener(EventListener listener)
           
protected  void removeSubscription(ChannelImpl channel)
           
 int responded()
           
 int responsePending()
           
 void resume()
          Called by deliver to resume anything waiting on this client.
 void setAdviceVersion(int version)
           
 void setBrowserId(String id)
           
protected  void setConnectionType(String type)
           
protected  void setId(String _id)
           
 void setJSONCommented(boolean commented)
           
 void setListener(dojox.cometd.Listener listener)
           
 void setTimeout(long timeoutMS)
           
 void startBatch()
           
 void subscribe(String toChannel)
          Deprecated. use Channel#subscribe(Client)
 dojox.cometd.Message takeMessage()
           
 List<dojox.cometd.Message> takeMessages()
           
 String toString()
           
 void unsubscribe(String toChannel)
          Deprecated. use Channel#unsubscribe(Client)
protected  void unsubscribeAll()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_bayeux

protected AbstractBayeux _bayeux
Constructor Detail

ClientImpl

protected ClientImpl(AbstractBayeux bayeux)

ClientImpl

protected ClientImpl(AbstractBayeux bayeux,
                     String idPrefix)

ClientImpl

protected ClientImpl(AbstractBayeux bayeux,
                     String idPrefix,
                     dojox.cometd.Listener listener)
Deprecated. 

Method Detail

publish

public void publish(String toChannel,
                    Object data,
                    String msgId)
Deprecated. use Channel#publish(Client, Object, String)

Specified by:
publish in interface dojox.cometd.Client
See Also:
Client.publish(java.lang.String, java.lang.Object, java.lang.String)

subscribe

public void subscribe(String toChannel)
Deprecated. use Channel#subscribe(Client)

Specified by:
subscribe in interface dojox.cometd.Client
See Also:
Client.subscribe(java.lang.String)

unsubscribe

public void unsubscribe(String toChannel)
Deprecated. use Channel#unsubscribe(Client)

Specified by:
unsubscribe in interface dojox.cometd.Client
See Also:
Client.unsubscribe(java.lang.String)

deliver

public void deliver(dojox.cometd.Client from,
                    dojox.cometd.Message message)
Deprecated. use deliver(Client, String, Object, String)

Specified by:
deliver in interface dojox.cometd.Client

deliver

public void deliver(dojox.cometd.Client from,
                    String toChannel,
                    Object data,
                    String id)
Specified by:
deliver in interface dojox.cometd.Client

doDelivery

protected void doDelivery(dojox.cometd.Client from,
                          dojox.cometd.Message message)

startBatch

public void startBatch()
Specified by:
startBatch in interface dojox.cometd.Client

endBatch

public void endBatch()
Specified by:
endBatch in interface dojox.cometd.Client

getConnectionType

public String getConnectionType()

getId

public String getId()
Specified by:
getId in interface dojox.cometd.Client

hasMessages

public boolean hasMessages()
Specified by:
hasMessages in interface dojox.cometd.Client

isJSONCommented

public boolean isJSONCommented()
Returns:
the commented

isLocal

public boolean isLocal()
Specified by:
isLocal in interface dojox.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

setListener

public void setListener(dojox.cometd.Listener listener)
Specified by:
setListener in interface dojox.cometd.Client

getListener

public dojox.cometd.Listener getListener()
Specified by:
getListener in interface dojox.cometd.Client

getMessages

public int getMessages()

takeMessages

public List<dojox.cometd.Message> takeMessages()
Specified by:
takeMessages in interface dojox.cometd.Client

takeMessage

public dojox.cometd.Message takeMessage()

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()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getAdviceVersion

public int getAdviceVersion()
Returns:
the advised

setAdviceVersion

public void setAdviceVersion(int version)
Parameters:
advised - the advised to set

addListener

public void addListener(EventListener listener)
Specified by:
addListener in interface dojox.cometd.Client

removeListener

public void removeListener(EventListener listener)
Specified by:
removeListener in interface dojox.cometd.Client

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeoutMS)


Copyright © 2008 Mort Bay Consulting. All Rights Reserved.