 import com.threerings.presents.dobj.DObject;
 import com.threerings.presents.dobj.Subscriber;
 
-/**
- * The object action is used to queue up a subscribe or unsubscribe
- * request.
- */
-class ObjectAction
-{
-    public var oid :int;
-    public var target :Subscriber;
-    public var subscribe :Boolean;
-
-    public function ObjectAction (
-            oid :int, target :Subscriber, subscribe :Boolean)
-    {
-        this.oid = oid;
-        this.target = target;
-        this.subscribe = subscribe;
-    }
-
-    public function toString () :String
-    {
-        return "oid=" + oid + ", target=" + target + ", subscribe=" + subscribe;
-    }
-}
-
 class PendingRequest
 {
     public var oid :int;

        if (oid <= 0) {
            target.requestFailed(oid, new ObjectAccessError("Invalid oid " + oid + "."));
        } else {
            queueAction(oid, target, true);
        }
    }

    // inherit documentation from the interface DObjectManager
    public function unsubscribeFromObject (oid :int, target :Subscriber) :void
    {
        queueAction(oid, target, false);
    }

    protected function queueAction (
            oid :int, target :Subscriber, subscribe :Boolean) :void
    {
        // queue up an action
        _actions.push(new ObjectAction(oid, target, subscribe));
    }

    // inherit documentation from the interface

        _flushInterval = new Timer(FLUSH_INTERVAL);
        _flushInterval.addEventListener(TimerEvent.TIMER, flushObjects);
        _flushInterval.start();
    }

    // documentation inherited from interface DObjectManager
