org.mortbay.cometd.continuation
Class ContinuationClient

java.lang.Object
  extended by org.mortbay.cometd.ClientImpl
      extended by org.mortbay.cometd.continuation.ContinuationClient
All Implemented Interfaces:
Client

public class ContinuationClient
extends ClientImpl

Extension of ClientImpl that uses Continuations to resume clients waiting for messages. Continuation clients are used for remote clients and have removed if they are not accessed within an idle timeout (@link ContinuationBayeux#_clientTimer).

Author:
gregw

Field Summary
 Timeout.Task _timeout
           
 
Method Summary
 void access()
           
 Continuation getContinuation()
           
 boolean isLocal()
           
 long lastAccessed()
           
 void remove(boolean timeout)
          Remove Client Unsubscribe client from all channels and remove it.
 void resume()
          Called by deliver to resume anything waiting on this client.
 void setContinuation(Continuation continuation)
           
 
Methods inherited from class org.mortbay.cometd.ClientImpl
addSubscription, deliver, endBatch, equals, getAdviceVersion, getBrowserId, getConnectionType, getId, getListener, getMessages, hasMessages, isJSONCommented, publish, removeSubscription, responded, responsePending, setAdviceVersion, setBrowserId, setConnectionType, setId, setJSONCommented, setListener, startBatch, subscribe, takeMessage, takeMessages, toString, unsubscribe, unsubscribeAll
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_timeout

public transient Timeout.Task _timeout
Method Detail

setContinuation

public void setContinuation(Continuation continuation)

getContinuation

public Continuation getContinuation()

resume

public void resume()
Description copied from class: ClientImpl
Called by deliver to resume anything waiting on this client.

Overrides:
resume in class ClientImpl

isLocal

public boolean isLocal()
Specified by:
isLocal in interface Client
Overrides:
isLocal in class ClientImpl
Returns:
True if the client is local. False if this client is either a remote HTTP client or a java client to a remote server.

access

public void access()

lastAccessed

public long lastAccessed()

remove

public void remove(boolean timeout)
Description copied from interface: Client
Remove Client Unsubscribe client from all channels and remove it.

Specified by:
remove in interface Client
Overrides:
remove in class ClientImpl


Copyright © 2009 Mort Bay Consulting. All Rights Reserved.