More style changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5248 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -33,11 +33,11 @@ public interface AccessController
|
||||
* Should return true if the supplied subscriber is allowed to
|
||||
* subscribe to the specified object.
|
||||
*/
|
||||
public boolean allowSubscribe (DObject object, Subscriber subscriber);
|
||||
boolean allowSubscribe (DObject object, Subscriber subscriber);
|
||||
|
||||
/**
|
||||
* Should return true if the supplied event is legal for dispatch on
|
||||
* the specified distributed object.
|
||||
*/
|
||||
public boolean allowDispatch (DObject object, DEvent event);
|
||||
boolean allowDispatch (DObject object, DEvent event);
|
||||
}
|
||||
|
||||
@@ -37,5 +37,5 @@ public interface AttributeChangeListener extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void attributeChanged (AttributeChangedEvent event);
|
||||
void attributeChanged (AttributeChangedEvent event);
|
||||
}
|
||||
|
||||
@@ -22,73 +22,61 @@
|
||||
package com.threerings.presents.dobj;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
public interface DObjectManager
|
||||
{
|
||||
/**
|
||||
* Returns true if this distributed object manager is the
|
||||
* authoritative manager for the specified distributed object, or fals
|
||||
* if we are only providing a proxy to the object.
|
||||
* Returns true if this distributed object manager is the authoritative manager for the
|
||||
* specified distributed object, or fals if we are only providing a proxy to the object.
|
||||
*/
|
||||
public boolean isManager (DObject object);
|
||||
boolean isManager (DObject object);
|
||||
|
||||
/**
|
||||
* Requests that the specified subscriber be subscribed to the object
|
||||
* identified by the supplied object id. That subscriber will be
|
||||
* notified when the object is available or if the subscription
|
||||
* request failed.
|
||||
* Requests that the specified subscriber be subscribed to the object identified by the
|
||||
* supplied object id. That subscriber will be notified when the object is available or if the
|
||||
* subscription request failed.
|
||||
*
|
||||
* @param oid The object id of the distributed object to which
|
||||
* subscription is desired.
|
||||
* @param oid The object id of the distributed object to which subscription is desired.
|
||||
* @param target The subscriber to be subscribed.
|
||||
*
|
||||
* @see Subscriber#objectAvailable
|
||||
* @see Subscriber#requestFailed
|
||||
*/
|
||||
public <T extends DObject> void subscribeToObject (
|
||||
int oid, Subscriber<T> target);
|
||||
<T extends DObject> void subscribeToObject (int oid, Subscriber<T> target);
|
||||
|
||||
/**
|
||||
* Requests that the specified subscriber be unsubscribed from the
|
||||
* object identified by the supplied object id.
|
||||
* Requests that the specified subscriber be unsubscribed from the object identified by the
|
||||
* supplied object id.
|
||||
*
|
||||
* @param oid The object id of the distributed object from which
|
||||
* unsubscription is desired.
|
||||
* @param oid The object id of the distributed object from which unsubscription is desired.
|
||||
* @param target The subscriber to be unsubscribed.
|
||||
*/
|
||||
public <T extends DObject> void unsubscribeFromObject (
|
||||
int oid, Subscriber<T> target);
|
||||
<T extends DObject> void unsubscribeFromObject (int oid, Subscriber<T> target);
|
||||
|
||||
/**
|
||||
* Posts a distributed object event into the system. Instead of
|
||||
* requesting the modification of a distributed object attribute by
|
||||
* calling the setter for that attribute on the object itself, an
|
||||
* <code>AttributeChangedEvent</code> 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.
|
||||
* Posts a distributed object event into the system. Instead of requesting the modification of
|
||||
* a distributed object attribute by calling the setter for that attribute on the object
|
||||
* itself, an <code>AttributeChangedEvent</code> 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.
|
||||
*
|
||||
* <p> 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.
|
||||
* <p> 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.
|
||||
*
|
||||
* @param event The event to be dispatched.
|
||||
*/
|
||||
public void postEvent (DEvent event);
|
||||
void postEvent (DEvent event);
|
||||
|
||||
/**
|
||||
* When a distributed object removes its last subscriber, it will call
|
||||
* this function to let the object manager know. The manager might
|
||||
* then choose to flush this object from the system or unregister from
|
||||
* some upstream manager whose object it was proxying, for example.
|
||||
* When a distributed object removes its last subscriber, it will call this function to let the
|
||||
* object manager know. The manager might then choose to flush this object from the system or
|
||||
* unregister from some upstream manager whose object it was proxying, for example.
|
||||
*/
|
||||
public void removedLastSubscriber (DObject obj, boolean deathWish);
|
||||
void removedLastSubscriber (DObject obj, boolean deathWish);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class DSet<E extends DSet.Entry>
|
||||
* Each entry provide an associated key which is used to determine its uniqueness in the
|
||||
* set. See the {@link DSet} class documentation for further information.
|
||||
*/
|
||||
public Comparable getKey ();
|
||||
Comparable getKey ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,5 +37,5 @@ public interface ElementUpdateListener extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void elementUpdated (ElementUpdatedEvent event);
|
||||
void elementUpdated (ElementUpdatedEvent event);
|
||||
}
|
||||
|
||||
@@ -39,5 +39,5 @@ public interface EventListener extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void eventReceived (DEvent event);
|
||||
void eventReceived (DEvent event);
|
||||
}
|
||||
|
||||
@@ -34,5 +34,5 @@ public interface MessageListener extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void messageReceived (MessageEvent event);
|
||||
void messageReceived (MessageEvent event);
|
||||
}
|
||||
|
||||
@@ -22,18 +22,17 @@
|
||||
package com.threerings.presents.dobj;
|
||||
|
||||
/**
|
||||
* Implemented by entites which wish to hear about object destruction
|
||||
* events.
|
||||
* Implemented by entites which wish to hear about object destruction events.
|
||||
*
|
||||
* @see DObject#addListener
|
||||
*/
|
||||
public interface ObjectDeathListener extends ChangeListener
|
||||
{
|
||||
/**
|
||||
* Called when this object has been destroyed. This will be called
|
||||
* <em>after</em> the event has been applied to the object.
|
||||
* Called when this object has been destroyed. This will be called <em>after</em> the event has
|
||||
* been applied to the object.
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void objectDestroyed (ObjectDestroyedEvent event);
|
||||
void objectDestroyed (ObjectDestroyedEvent event);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface OidListListener extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void objectAdded (ObjectAddedEvent event);
|
||||
void objectAdded (ObjectAddedEvent event);
|
||||
|
||||
/**
|
||||
* Called when an object removed event has been dispatched on an
|
||||
@@ -45,5 +45,5 @@ public interface OidListListener extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void objectRemoved (ObjectRemovedEvent event);
|
||||
void objectRemoved (ObjectRemovedEvent event);
|
||||
}
|
||||
|
||||
@@ -35,5 +35,5 @@ public interface ProxySubscriber extends Subscriber<DObject>
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void eventReceived (DEvent event);
|
||||
void eventReceived (DEvent event);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface RootDObjectManager extends DObjectManager, RunQueue
|
||||
* Looks up and returns the requested distributed object in the dobj table, returning null if
|
||||
* no object exists with that oid.
|
||||
*/
|
||||
public DObject getObject (int oid);
|
||||
DObject getObject (int oid);
|
||||
|
||||
/**
|
||||
* Registers a distributed object instance of the supplied class with the system and assigns it
|
||||
@@ -44,7 +44,7 @@ public interface RootDObjectManager extends DObjectManager, RunQueue
|
||||
*
|
||||
* @return the registered object for the caller's convenience.
|
||||
*/
|
||||
public <T extends DObject> T registerObject (T object);
|
||||
<T extends DObject> T registerObject (T object);
|
||||
|
||||
/**
|
||||
* Requests that the specified object be destroyed. Once destroyed an object is removed from
|
||||
@@ -52,5 +52,5 @@ public interface RootDObjectManager extends DObjectManager, RunQueue
|
||||
*
|
||||
* @param oid The object id of the distributed object to be destroyed.
|
||||
*/
|
||||
public void destroyObject (int oid);
|
||||
void destroyObject (int oid);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface SetListener<T extends DSet.Entry> extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void entryAdded (EntryAddedEvent<T> event);
|
||||
void entryAdded (EntryAddedEvent<T> event);
|
||||
|
||||
/**
|
||||
* Called when an entry updated event has been dispatched on an
|
||||
@@ -49,7 +49,7 @@ public interface SetListener<T extends DSet.Entry> extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void entryUpdated (EntryUpdatedEvent<T> event);
|
||||
void entryUpdated (EntryUpdatedEvent<T> event);
|
||||
|
||||
/**
|
||||
* Called when an entry removed event has been dispatched on an
|
||||
@@ -58,5 +58,5 @@ public interface SetListener<T extends DSet.Entry> extends ChangeListener
|
||||
*
|
||||
* @param event The event that was dispatched on the object.
|
||||
*/
|
||||
public void entryRemoved (EntryRemovedEvent<T> event);
|
||||
void entryRemoved (EntryRemovedEvent<T> event);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface Subscriber<T extends DObject>
|
||||
*
|
||||
* @see DObjectManager#subscribeToObject
|
||||
*/
|
||||
public void objectAvailable (T object);
|
||||
void objectAvailable (T object);
|
||||
|
||||
/**
|
||||
* Called when a subscription request has failed. The nature of the
|
||||
@@ -58,5 +58,5 @@ public interface Subscriber<T extends DObject>
|
||||
*
|
||||
* @see DObjectManager#subscribeToObject
|
||||
*/
|
||||
public void requestFailed (int oid, ObjectAccessException cause);
|
||||
void requestFailed (int oid, ObjectAccessException cause);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user