com.threerings.presents.server
Class PresentsDObjectMgr.AccessObjectEvent<T extends DObject>

java.lang.Object
  extended by com.threerings.presents.dobj.DEvent
      extended by com.threerings.presents.server.PresentsDObjectMgr.AccessObjectEvent<T>
All Implemented Interfaces:
Streamable
Enclosing class:
PresentsDObjectMgr

protected class PresentsDObjectMgr.AccessObjectEvent<T extends DObject>
extends DEvent

Used to make an object available to a subscriber (with or without the associated subscription).


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.io.Streamable
Streamable.Closure
 
Field Summary
protected  int _action
           
protected  int _oid
           
protected  Subscriber<T> _target
           
static int SUBSCRIBE
           
static int UNSUBSCRIBE
           
 
Fields inherited from class com.threerings.presents.dobj.DEvent
_actualTransport, _soid, _toid, _transport, eventId, UNSET_OLD_ENTRY, UNSET_OLD_VALUE
 
Constructor Summary
PresentsDObjectMgr.AccessObjectEvent(int oid, Subscriber<T> target, int action)
           
 
Method Summary
 boolean applyToObject(DObject target)
          Applies the attribute modifications represented by this event to the specified target object.
 boolean isPrivate()
          Some events are used only internally on the server and need not be broadcast to subscribers, proxy or otherwise.
 
Methods inherited from class com.threerings.presents.dobj.DEvent
alreadyApplied, getActualTransport, getSourceOid, getTargetOid, getTransport, noteActualTransport, notifyListener, setSourceOid, setTargetOid, setTransport, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBSCRIBE

public static final int SUBSCRIBE
See Also:
Constant Field Values

UNSUBSCRIBE

public static final int UNSUBSCRIBE
See Also:
Constant Field Values

_oid

protected int _oid

_target

protected Subscriber<T extends DObject> _target

_action

protected int _action
Constructor Detail

PresentsDObjectMgr.AccessObjectEvent

public PresentsDObjectMgr.AccessObjectEvent(int oid,
                                            Subscriber<T> target,
                                            int action)
Method Detail

isPrivate

public boolean isPrivate()
Description copied from class: DEvent
Some events are used only internally on the server and need not be broadcast to subscribers, proxy or otherwise. Such events can return true here and short-circuit the normal proxy event dispatch mechanism.

Overrides:
isPrivate in class DEvent

applyToObject

public boolean applyToObject(DObject target)
                      throws ObjectAccessException
Description copied from class: DEvent
Applies the attribute modifications represented by this event to the specified target object. This is called by the distributed object manager in the course of dispatching events and should not be called directly.

Specified by:
applyToObject in class DEvent
Returns:
true if the object manager should go on to notify the object's listeners of this event, false if the event should be treated silently and the listeners should not be notified.
Throws:
ObjectAccessException - thrown if there is any problem applying the event to the object (invalid attribute, etc.).