com.threerings.presents.server
Class PresentsSession.ClientProxy

java.lang.Object
  extended by com.threerings.presents.server.PresentsSession.ClientProxy
All Implemented Interfaces:
ProxySubscriber, Subscriber<DObject>
Enclosing class:
PresentsSession

protected class PresentsSession.ClientProxy
extends Object
implements ProxySubscriber

Used to track information about an object subscription.


Field Summary
protected  long _firstEventId
           
protected  PresentsConnection _oconn
           
 DObject object
           
 
Constructor Summary
protected PresentsSession.ClientProxy()
           
 
Method Summary
 void eventReceived(DEvent event)
          Called when any event has been dispatched on an object.
 ClientObject getClientObject()
          Returns the client object that represents the subscriber for whom we are proxying.
 void objectAvailable(DObject dobj)
          Called when a subscription request has succeeded and the object is available.
 void requestFailed(int oid, ObjectAccessException cause)
          Called when a subscription request has failed.
 void unsubscribe()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

public DObject object

_firstEventId

protected long _firstEventId

_oconn

protected PresentsConnection _oconn
Constructor Detail

PresentsSession.ClientProxy

protected PresentsSession.ClientProxy()
Method Detail

unsubscribe

public void unsubscribe()

objectAvailable

public void objectAvailable(DObject dobj)
Description copied from interface: Subscriber
Called when a subscription request has succeeded and the object is available. If the object was requested for subscription, the subscriber can subsequently receive notifications by registering itself as a listener of some sort (see DObject.addListener(com.threerings.presents.dobj.ChangeListener)).

Specified by:
objectAvailable in interface Subscriber<DObject>
See Also:
DObjectManager.subscribeToObject(int, com.threerings.presents.dobj.Subscriber)

requestFailed

public void requestFailed(int oid,
                          ObjectAccessException cause)
Description copied from interface: Subscriber
Called when a subscription request has failed. The nature of the failure will be communicated via the supplied ObjectAccessException.

Specified by:
requestFailed in interface Subscriber<DObject>
See Also:
DObjectManager.subscribeToObject(int, com.threerings.presents.dobj.Subscriber)

eventReceived

public void eventReceived(DEvent event)
Description copied from interface: ProxySubscriber
Called when any event has been dispatched on an object.

Specified by:
eventReceived in interface ProxySubscriber
Parameters:
event - The event that was dispatched on the object.

getClientObject

public ClientObject getClientObject()
Description copied from interface: ProxySubscriber
Returns the client object that represents the subscriber for whom we are proxying.

Specified by:
getClientObject in interface ProxySubscriber