|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DObjectManager
The distributed object manager is responsible for managing the creation and destruction of distributed objects and propagating dobj events to the appropriate subscribers. On the client, objects are managed as proxies to the real objects managed by the server, so attribute change requests are forwarded to the server and events coming down from the server are delivered to the local subscribers. On the server, the objects are managed directly.
| Method Summary | ||
|---|---|---|
boolean |
isManager(DObject object)
Returns true if this distributed object manager is the authoritative manager for the specified distributed object, or false if we are only providing a proxy to the object. |
|
void |
postEvent(DEvent event)
Posts a distributed object event into the system. |
|
void |
removedLastSubscriber(DObject obj,
boolean deathWish)
When a distributed object removes its last subscriber, it will call this function to let the object manager know. |
|
|
subscribeToObject(int oid,
Subscriber<T> target)
Requests that the specified subscriber be subscribed to the object identified by the supplied object id. |
|
|
unsubscribeFromObject(int oid,
Subscriber<T> target)
Requests that the specified subscriber be unsubscribed from the object identified by the supplied object id. |
|
| Method Detail |
|---|
boolean isManager(DObject object)
<T extends DObject> void subscribeToObject(int oid,
Subscriber<T> target)
oid - The object id of the distributed object to which subscription is desired.target - The subscriber to be subscribed.Subscriber.objectAvailable(T),
Subscriber.requestFailed(int, com.threerings.presents.dobj.ObjectAccessException)
<T extends DObject> void unsubscribeFromObject(int oid,
Subscriber<T> target)
oid - The object id of the distributed object from which unsubscription is desired.target - The subscriber to be unsubscribed.void postEvent(DEvent event)
AttributeChangedEvent can be constructed and posted directly. This
is true for all event types and is useful for situations where one doesn't have access to
the object in question, but needs to affect some event.
This event will be forwarded to the ultimate manager of the object (on the client, this means it will be forwarded to the server) where it will be checked for validity and then applied to the object and dispatched to all its subscribers.
event - The event to be dispatched.
void removedLastSubscriber(DObject obj,
boolean deathWish)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||