From c743432676601a6c44eb3914d5ecb22de20bb923 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 22 Jul 2008 13:02:13 +0000 Subject: [PATCH] More style changes. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5248 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/crowd/server/OccupantOp.java | 2 +- .../crowd/server/PlaceRegistry.java | 4 +- .../threerings/crowd/util/CrowdContext.java | 10 +-- .../presents/client/ClientObserver.java | 8 +- .../presents/client/InvocationDecoder.java | 17 ++--- .../presents/client/InvocationService.java | 76 ++++++++----------- .../presents/client/SessionObserver.java | 8 +- .../presents/client/TimeBaseService.java | 12 ++- .../presents/dobj/AccessController.java | 4 +- .../dobj/AttributeChangeListener.java | 2 +- .../presents/dobj/DObjectManager.java | 72 ++++++++---------- .../com/threerings/presents/dobj/DSet.java | 2 +- .../presents/dobj/ElementUpdateListener.java | 2 +- .../presents/dobj/EventListener.java | 2 +- .../presents/dobj/MessageListener.java | 2 +- .../presents/dobj/ObjectDeathListener.java | 9 +-- .../presents/dobj/OidListListener.java | 4 +- .../presents/dobj/ProxySubscriber.java | 2 +- .../presents/dobj/RootDObjectManager.java | 6 +- .../threerings/presents/dobj/SetListener.java | 6 +- .../threerings/presents/dobj/Subscriber.java | 4 +- .../presents/peer/client/PeerService.java | 4 +- .../presents/peer/server/PeerManager.java | 14 ++-- .../presents/server/ClientFactory.java | 4 +- .../presents/server/ClientManager.java | 8 +- .../server/ClientResolutionListener.java | 4 +- .../presents/server/PresentsClient.java | 6 +- .../presents/server/RebootManager.java | 2 +- .../presents/server/ReportManager.java | 2 +- .../presents/server/ShutdownManager.java | 2 +- .../server/net/ConnectionManager.java | 2 +- .../server/net/ConnectionObserver.java | 7 +- .../presents/server/net/MessageHandler.java | 2 +- .../presents/server/net/NetEventHandler.java | 4 +- .../presents/tools/GenServiceTask.java | 3 +- .../threerings/presents/tools/GenUtil.java | 3 +- .../presents/util/PresentsContext.java | 25 +++--- .../threerings/util/signal/SignalManager.java | 2 +- 38 files changed, 155 insertions(+), 193 deletions(-) diff --git a/src/java/com/threerings/crowd/server/OccupantOp.java b/src/java/com/threerings/crowd/server/OccupantOp.java index 6870f332e..0501d4fd2 100644 --- a/src/java/com/threerings/crowd/server/OccupantOp.java +++ b/src/java/com/threerings/crowd/server/OccupantOp.java @@ -32,5 +32,5 @@ public interface OccupantOp /** * Called with the occupant info for each occupant in the location. */ - public void apply (OccupantInfo info); + void apply (OccupantInfo info); } diff --git a/src/java/com/threerings/crowd/server/PlaceRegistry.java b/src/java/com/threerings/crowd/server/PlaceRegistry.java index beccbaf41..c3abd1491 100644 --- a/src/java/com/threerings/crowd/server/PlaceRegistry.java +++ b/src/java/com/threerings/crowd/server/PlaceRegistry.java @@ -142,7 +142,7 @@ public class PlaceRegistry { final Iterator itr = _pmgrs.values().iterator(); return new Iterator() { - public boolean hasNext (){ + public boolean hasNext () { return itr.hasNext(); } public PlaceObject next () { @@ -246,7 +246,7 @@ public class PlaceRegistry throws Exception { @SuppressWarnings("unchecked") Class clazz = - (Class) Class.forName(config.getManagerClassName()); + (Class)Class.forName(config.getManagerClassName()); return _injector.getInstance(clazz); } diff --git a/src/java/com/threerings/crowd/util/CrowdContext.java b/src/java/com/threerings/crowd/util/CrowdContext.java index 74afed774..0e04d5fbb 100644 --- a/src/java/com/threerings/crowd/util/CrowdContext.java +++ b/src/java/com/threerings/crowd/util/CrowdContext.java @@ -37,17 +37,17 @@ public interface CrowdContext extends PresentsContext /** * Returns a reference to the location director. */ - public LocationDirector getLocationDirector (); + LocationDirector getLocationDirector (); /** * Returns a reference to the occupant director. */ - public OccupantDirector getOccupantDirector (); + OccupantDirector getOccupantDirector (); /** * Provides access to the chat director. */ - public ChatDirector getChatDirector (); + ChatDirector getChatDirector (); /** * When the client enters a new place, the location director creates a @@ -64,12 +64,12 @@ public interface CrowdContext extends PresentsContext * won't be displayed (via a call to this function) until we have * fully entered the place and are ready for user interaction. */ - public void setPlaceView (PlaceView view); + void setPlaceView (PlaceView view); /** * When the client leaves a place, the place controller will remove * any place view it set previously via {@link #setPlaceView} with a * call to this method. */ - public void clearPlaceView (PlaceView view); + void clearPlaceView (PlaceView view); } diff --git a/src/java/com/threerings/presents/client/ClientObserver.java b/src/java/com/threerings/presents/client/ClientObserver.java index cc53a5539..4ef2f0029 100644 --- a/src/java/com/threerings/presents/client/ClientObserver.java +++ b/src/java/com/threerings/presents/client/ClientObserver.java @@ -54,19 +54,19 @@ public interface ClientObserver extends SessionObserver * we are simply reporting intermediate status (we might be falling back to an alternative port * or delaying our auto-retry attempt due to server overload). */ - public void clientFailedToLogon (Client client, Exception cause); + void clientFailedToLogon (Client client, Exception cause); /** * Called when the connection to the server went away for some unexpected reason. This will be * followed by a call to {@link #clientDidLogoff}. */ - public void clientConnectionFailed (Client client, Exception cause); + void clientConnectionFailed (Client client, Exception cause); /** * Called when an abortable logoff request is made. If the observer returns false from this * method, the client will abort the logoff request. */ - public boolean clientWillLogoff (Client client); + boolean clientWillLogoff (Client client); /** * Called after the client is completely logged off from a successful session and is ready to @@ -74,5 +74,5 @@ public interface ClientObserver extends SessionObserver * terminated, not after a logon attempt failed as that failure will be reported by {@link * #clientFailedToLogon}. */ - public void clientDidClear (Client client); + void clientDidClear (Client client); } diff --git a/src/java/com/threerings/presents/client/InvocationDecoder.java b/src/java/com/threerings/presents/client/InvocationDecoder.java index 5fa53752e..cbca8589a 100644 --- a/src/java/com/threerings/presents/client/InvocationDecoder.java +++ b/src/java/com/threerings/presents/client/InvocationDecoder.java @@ -21,23 +21,19 @@ package com.threerings.presents.client; -import com.samskivert.util.StringUtil; - import static com.threerings.presents.Log.log; /** - * Provides the basic functionality used to dispatch invocation - * notification events. + * Provides the basic functionality used to dispatch invocation notification events. */ public abstract class InvocationDecoder { - /** The receiver for which we're decoding and dipatching - * notifications. */ + /** The receiver for which we're decoding and dipatching notifications. */ public InvocationReceiver receiver; /** - * Returns the generated hash code that is used to identify this - * invocation notification service. + * Returns the generated hash code that is used to identify this invocation notification + * service. */ public abstract String getReceiverCode (); @@ -46,8 +42,7 @@ public abstract class InvocationDecoder */ public void dispatchNotification (int methodId, Object[] args) { - log.warning("Requested to dispatch unknown method " + - "[receiver=" + receiver + ", methodId=" + methodId + - ", args=" + StringUtil.toString(args) + "]."); + log.warning("Requested to dispatch unknown method", "receiver", receiver, + "methodId", methodId, "args", args); } } diff --git a/src/java/com/threerings/presents/client/InvocationService.java b/src/java/com/threerings/presents/client/InvocationService.java index 4b59287fa..cda1a49ab 100644 --- a/src/java/com/threerings/presents/client/InvocationService.java +++ b/src/java/com/threerings/presents/client/InvocationService.java @@ -22,10 +22,9 @@ package com.threerings.presents.client; /** - * Serves as the base interface for invocation services. An invocation - * service can be defined by extending this interface and defining service - * methods, as well as response listeners (which must extend {@link - * InvocationListener}). For example: + * Serves as the base interface for invocation services. An invocation service can be defined by + * extending this interface and defining service methods, as well as response listeners (which must + * extend {@link InvocationListener}). For example: * *
  * public interface LocationService extends InvocationService
@@ -35,39 +34,30 @@ package com.threerings.presents.client;
  *     public interface MoveListener extends InvocationListener
  *     {
  *         // Called in response to a successful moveTo() request.
- *         public void moveSucceeded (PlaceConfig config);
+ *         void moveSucceeded (PlaceConfig config);
  *     }
  *
- *     // Requests that this client's body be moved to the specified
- *     // location.
+ *     // Requests that this client's body be moved to the specified location.
  *     //
- *     // @param placeId the object id of the place object to which the
- *     // body should be moved.
- *     // @param listener the listener that will be informed of success or
- *     // failure.
- *     public void moveTo (int placeId, MoveListener listener);
+ *     // @param placeId the object id of the place object to which the body should be moved.
+ *     // @param listener the listener that will be informed of success or failure.
+ *     void moveTo (int placeId, MoveListener listener);
  * }
  * 
* - * From this interface, a LocationProvider interface will be - * generated which should be implemented by whatever server entity that - * will actually provide the server side of this invocation service. That - * provider interface would look like the following: + * From this interface, a LocationProvider interface will be generated which should be + * implemented by whatever server entity that will actually provide the server side of this + * invocation service. That provider interface would look like the following: * *
  * public interface LocationProvider extends InvocationProvider
  * {
- *      // Requests that this client's body be moved to the specified
- *      // location.
+ *      // Requests that this client's body be moved to the specified location.
  *      //
- *      // @param caller the client object of the client that invoked this
- *      // remotely callable method.
- *      // @param placeId the object id of the place object to which the
- *      // body should be moved.
- *      // @param listener the listener that should be informed of success
- *      // or failure.
- *     public void moveTo (ClientObject caller, int placeId,
- *                         MoveListener listener)
+ *      // @param caller the client object of the client that invoked this remotely callable method.
+ *      // @param placeId the object id of the place object to which the body should be moved.
+ *      // @param listener the listener that should be informed of success or failure.
+ *     void moveTo (ClientObject caller, int placeId, MoveListener listener)
  *         throws InvocationException;
  * }
  * 
@@ -75,54 +65,50 @@ package com.threerings.presents.client; public interface InvocationService { /** - * Invocation service methods that require a response should take a - * listener argument that can be notified of request success or - * failure. The listener argument should extend this interface so that - * generic failure can be reported in all cases. For example: + * Invocation service methods that require a response should take a listener argument that can + * be notified of request success or failure. The listener argument should extend this + * interface so that generic failure can be reported in all cases. For example: * *
      * // Used to communicate responses to moveTo requests.
      * public interface MoveListener extends InvocationListener
      * {
-     *     // Called in response to a successful moveTo
-     *     // request.
-     *     public void moveSucceeded (PlaceConfig config);
+     *     // Called in response to a successful moveTo request.
+     *     void moveSucceeded (PlaceConfig config);
      * }
      * 
*/ public static interface InvocationListener { /** - * Called to report request failure. If the invocation services - * system detects failure of any kind, it will report it via this - * callback. Particular services may also make use of this - * callback to report failures of their own, or they may opt to - * define more specific failure callbacks. + * Called to report request failure. If the invocation services system detects failure of + * any kind, it will report it via this callback. Particular services may also make use of + * this callback to report failures of their own, or they may opt to define more specific + * failure callbacks. */ - public void requestFailed (String cause); + void requestFailed (String cause); } /** - * Extends the {@link InvocationListener} with a basic success - * callback. + * Extends the {@link InvocationListener} with a basic success callback. */ public static interface ConfirmListener extends InvocationListener { /** * Indicates that the request was successfully processed. */ - public void requestProcessed (); + void requestProcessed (); } /** - * Extends the {@link InvocationListener} with a basic success - * callback that delivers a result object. + * Extends the {@link InvocationListener} with a basic success callback that delivers a result + * object. */ public static interface ResultListener extends InvocationListener { /** * Indicates that the request was successfully processed. */ - public void requestProcessed (Object result); + void requestProcessed (Object result); } } diff --git a/src/java/com/threerings/presents/client/SessionObserver.java b/src/java/com/threerings/presents/client/SessionObserver.java index f96b57e96..20d76f3bc 100644 --- a/src/java/com/threerings/presents/client/SessionObserver.java +++ b/src/java/com/threerings/presents/client/SessionObserver.java @@ -32,23 +32,23 @@ public interface SessionObserver /** * Called immediately before a logon is attempted. */ - public void clientWillLogon (Client client); + void clientWillLogon (Client client); /** * Called after the client successfully connected to and authenticated with the server. The * entire object system is up and running by the time this method is called. */ - public void clientDidLogon (Client client); + void clientDidLogon (Client client); /** * For systems that allow switching screen names after logon, this method is called whenever a * screen name change takes place to report that the client object has been replaced to * potential client-side subscribers. */ - public void clientObjectDidChange (Client client); + void clientObjectDidChange (Client client); /** * Called after the client has been logged off of the server and has disconnected. */ - public void clientDidLogoff (Client client); + void clientDidLogoff (Client client); } diff --git a/src/java/com/threerings/presents/client/TimeBaseService.java b/src/java/com/threerings/presents/client/TimeBaseService.java index 2f78b7713..b3d78be50 100644 --- a/src/java/com/threerings/presents/client/TimeBaseService.java +++ b/src/java/com/threerings/presents/client/TimeBaseService.java @@ -25,8 +25,8 @@ import com.threerings.presents.client.Client; import com.threerings.presents.client.InvocationService; /** - * Provides a means by which to obtain access to a time base object which - * can be used to convert delta times into absolute times. + * Provides a means by which to obtain access to a time base object which can be used to convert + * delta times into absolute times. */ public interface TimeBaseService extends InvocationService { @@ -36,15 +36,13 @@ public interface TimeBaseService extends InvocationService public static interface GotTimeBaseListener extends InvocationListener { /** - * Communicates the result of a successful {@link #getTimeOid} - * request. + * Communicates the result of a successful {@link #getTimeOid} request. */ - public void gotTimeOid (int timeOid); + void gotTimeOid (int timeOid); } /** * Requests the oid of the specified time base object be fetched. */ - public void getTimeOid ( - Client client, String timeBase, GotTimeBaseListener listener); + void getTimeOid (Client client, String timeBase, GotTimeBaseListener listener); } diff --git a/src/java/com/threerings/presents/dobj/AccessController.java b/src/java/com/threerings/presents/dobj/AccessController.java index 5fa9e84e4..a2ac6aa59 100644 --- a/src/java/com/threerings/presents/dobj/AccessController.java +++ b/src/java/com/threerings/presents/dobj/AccessController.java @@ -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); } diff --git a/src/java/com/threerings/presents/dobj/AttributeChangeListener.java b/src/java/com/threerings/presents/dobj/AttributeChangeListener.java index cd3e8a860..cb084911c 100644 --- a/src/java/com/threerings/presents/dobj/AttributeChangeListener.java +++ b/src/java/com/threerings/presents/dobj/AttributeChangeListener.java @@ -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); } diff --git a/src/java/com/threerings/presents/dobj/DObjectManager.java b/src/java/com/threerings/presents/dobj/DObjectManager.java index 74359d341..0a98a9bcc 100644 --- a/src/java/com/threerings/presents/dobj/DObjectManager.java +++ b/src/java/com/threerings/presents/dobj/DObjectManager.java @@ -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 void subscribeToObject ( - int oid, Subscriber target); + void subscribeToObject (int oid, Subscriber 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 void unsubscribeFromObject ( - int oid, Subscriber target); + void unsubscribeFromObject (int oid, Subscriber 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 - * 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. + * 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 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. + *

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); } diff --git a/src/java/com/threerings/presents/dobj/DSet.java b/src/java/com/threerings/presents/dobj/DSet.java index df87582cc..015395110 100644 --- a/src/java/com/threerings/presents/dobj/DSet.java +++ b/src/java/com/threerings/presents/dobj/DSet.java @@ -62,7 +62,7 @@ public class DSet * 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 (); } /** diff --git a/src/java/com/threerings/presents/dobj/ElementUpdateListener.java b/src/java/com/threerings/presents/dobj/ElementUpdateListener.java index 45dbb2fcb..12c6cc957 100644 --- a/src/java/com/threerings/presents/dobj/ElementUpdateListener.java +++ b/src/java/com/threerings/presents/dobj/ElementUpdateListener.java @@ -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); } diff --git a/src/java/com/threerings/presents/dobj/EventListener.java b/src/java/com/threerings/presents/dobj/EventListener.java index e4981c0ba..579f3b2f2 100644 --- a/src/java/com/threerings/presents/dobj/EventListener.java +++ b/src/java/com/threerings/presents/dobj/EventListener.java @@ -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); } diff --git a/src/java/com/threerings/presents/dobj/MessageListener.java b/src/java/com/threerings/presents/dobj/MessageListener.java index f07b79001..b62b55323 100644 --- a/src/java/com/threerings/presents/dobj/MessageListener.java +++ b/src/java/com/threerings/presents/dobj/MessageListener.java @@ -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); } diff --git a/src/java/com/threerings/presents/dobj/ObjectDeathListener.java b/src/java/com/threerings/presents/dobj/ObjectDeathListener.java index 03a9b4a17..da75cba27 100644 --- a/src/java/com/threerings/presents/dobj/ObjectDeathListener.java +++ b/src/java/com/threerings/presents/dobj/ObjectDeathListener.java @@ -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 - * after the event has been applied to the object. + * Called when this object has been destroyed. This will be called after 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); } diff --git a/src/java/com/threerings/presents/dobj/OidListListener.java b/src/java/com/threerings/presents/dobj/OidListListener.java index 5da71ce73..89d5e669f 100644 --- a/src/java/com/threerings/presents/dobj/OidListListener.java +++ b/src/java/com/threerings/presents/dobj/OidListListener.java @@ -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); } diff --git a/src/java/com/threerings/presents/dobj/ProxySubscriber.java b/src/java/com/threerings/presents/dobj/ProxySubscriber.java index ec90f9378..a163bd1a1 100644 --- a/src/java/com/threerings/presents/dobj/ProxySubscriber.java +++ b/src/java/com/threerings/presents/dobj/ProxySubscriber.java @@ -35,5 +35,5 @@ public interface ProxySubscriber extends Subscriber * * @param event The event that was dispatched on the object. */ - public void eventReceived (DEvent event); + void eventReceived (DEvent event); } diff --git a/src/java/com/threerings/presents/dobj/RootDObjectManager.java b/src/java/com/threerings/presents/dobj/RootDObjectManager.java index dc5ab0559..09f83cb3d 100644 --- a/src/java/com/threerings/presents/dobj/RootDObjectManager.java +++ b/src/java/com/threerings/presents/dobj/RootDObjectManager.java @@ -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 registerObject (T object); + 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); } diff --git a/src/java/com/threerings/presents/dobj/SetListener.java b/src/java/com/threerings/presents/dobj/SetListener.java index 0a9e7a5f6..76fae9180 100644 --- a/src/java/com/threerings/presents/dobj/SetListener.java +++ b/src/java/com/threerings/presents/dobj/SetListener.java @@ -40,7 +40,7 @@ public interface SetListener extends ChangeListener * * @param event The event that was dispatched on the object. */ - public void entryAdded (EntryAddedEvent event); + void entryAdded (EntryAddedEvent event); /** * Called when an entry updated event has been dispatched on an @@ -49,7 +49,7 @@ public interface SetListener extends ChangeListener * * @param event The event that was dispatched on the object. */ - public void entryUpdated (EntryUpdatedEvent event); + void entryUpdated (EntryUpdatedEvent event); /** * Called when an entry removed event has been dispatched on an @@ -58,5 +58,5 @@ public interface SetListener extends ChangeListener * * @param event The event that was dispatched on the object. */ - public void entryRemoved (EntryRemovedEvent event); + void entryRemoved (EntryRemovedEvent event); } diff --git a/src/java/com/threerings/presents/dobj/Subscriber.java b/src/java/com/threerings/presents/dobj/Subscriber.java index 87dbe4826..b224d426e 100644 --- a/src/java/com/threerings/presents/dobj/Subscriber.java +++ b/src/java/com/threerings/presents/dobj/Subscriber.java @@ -49,7 +49,7 @@ public interface Subscriber * * @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 * * @see DObjectManager#subscribeToObject */ - public void requestFailed (int oid, ObjectAccessException cause); + void requestFailed (int oid, ObjectAccessException cause); } diff --git a/src/java/com/threerings/presents/peer/client/PeerService.java b/src/java/com/threerings/presents/peer/client/PeerService.java index 7c57988f4..04ab564cd 100644 --- a/src/java/com/threerings/presents/peer/client/PeerService.java +++ b/src/java/com/threerings/presents/peer/client/PeerService.java @@ -35,10 +35,10 @@ public interface PeerService extends InvocationService * Informs the node that the sending peer ratifies its acquisition or release of the specified * lock. */ - public void ratifyLockAction (Client client, Lock lock, boolean acquire); + void ratifyLockAction (Client client, Lock lock, boolean acquire); /** * Requests that the specified action be invoked on this server. */ - public void invokeAction (Client client, byte[] serializedAction); + void invokeAction (Client client, byte[] serializedAction); } diff --git a/src/java/com/threerings/presents/peer/server/PeerManager.java b/src/java/com/threerings/presents/peer/server/PeerManager.java index 4e7be2ff1..8e11dfddc 100644 --- a/src/java/com/threerings/presents/peer/server/PeerManager.java +++ b/src/java/com/threerings/presents/peer/server/PeerManager.java @@ -91,7 +91,7 @@ public abstract class PeerManager /** * Called when some possibly cached data has changed on one of our peer servers. */ - public void changedCacheData (Streamable data); + void changedCacheData (Streamable data); } /** @@ -103,25 +103,25 @@ public abstract class PeerManager /** * Called when this node has been forced to drop a lock. */ - public void droppedLock (NodeObject.Lock lock); + void droppedLock (NodeObject.Lock lock); } /** Used by {@link #lookupNodeDatum}. */ public static interface Lookup { - public T lookup (NodeObject nodeobj); + T lookup (NodeObject nodeobj); } /** Used by {@link #applyToNodes}. */ public static interface Operation { - public void apply (NodeObject nodeobj); + void apply (NodeObject nodeobj); } /** Used by {@link #invokeOnNodes}. */ public static interface Function { - public void invoke (Client client, NodeObject nodeobj); + void invoke (Client client, NodeObject nodeobj); } /** @@ -134,13 +134,13 @@ public abstract class PeerManager * Called when the resource lock was acquired successfully. The lock will be released * immediately after this function call finishes. */ - public void run (); + void run (); /** * Called when the resource lock was not acquired successfully, with the name of the peer * who is holding the lock (or null in case of a generic failure). */ - public void fail (String peerName); + void fail (String peerName); } /** diff --git a/src/java/com/threerings/presents/server/ClientFactory.java b/src/java/com/threerings/presents/server/ClientFactory.java index 5531bf473..037a4d5f1 100644 --- a/src/java/com/threerings/presents/server/ClientFactory.java +++ b/src/java/com/threerings/presents/server/ClientFactory.java @@ -45,11 +45,11 @@ public interface ClientFactory * Returns the {@link PresentsClient} derived class to use for the session that authenticated * with the supplied request. */ - public Class getClientClass (AuthRequest areq); + Class getClientClass (AuthRequest areq); /** * Returns the {@link ClientResolver} derived class to use to resolve a client with the * specified username. */ - public Class getClientResolverClass (Name username); + Class getClientResolverClass (Name username); } diff --git a/src/java/com/threerings/presents/server/ClientManager.java b/src/java/com/threerings/presents/server/ClientManager.java index 60c48fab9..7858ed483 100644 --- a/src/java/com/threerings/presents/server/ClientManager.java +++ b/src/java/com/threerings/presents/server/ClientManager.java @@ -68,12 +68,12 @@ public class ClientManager /** * Called with the resolved client object. */ - public void apply (ClientObject clobj); + void apply (ClientObject clobj); /** * Called if the client resolution fails. */ - public void resolutionFailed (Exception e); + void resolutionFailed (Exception e); } /** @@ -84,13 +84,13 @@ public class ClientManager /** * Called when a client has authenticated and been resolved and has started their session. */ - public void clientSessionDidStart (PresentsClient client); + void clientSessionDidStart (PresentsClient client); /** * Called when a client has logged off or been forcibly logged off due to inactivity and * has thus ended their session. */ - public void clientSessionDidEnd (PresentsClient client); + void clientSessionDidEnd (PresentsClient client); } /** diff --git a/src/java/com/threerings/presents/server/ClientResolutionListener.java b/src/java/com/threerings/presents/server/ClientResolutionListener.java index d79241ead..6f47990ec 100644 --- a/src/java/com/threerings/presents/server/ClientResolutionListener.java +++ b/src/java/com/threerings/presents/server/ClientResolutionListener.java @@ -34,10 +34,10 @@ public interface ClientResolutionListener /** * Called when resolution completed successfully. */ - public void clientResolved (Name username, ClientObject clobj); + void clientResolved (Name username, ClientObject clobj); /** * Called when resolution fails. */ - public void resolutionFailed (Name username, Exception reason); + void resolutionFailed (Name username, Exception reason); } diff --git a/src/java/com/threerings/presents/server/PresentsClient.java b/src/java/com/threerings/presents/server/PresentsClient.java index 526e383c3..5e4933550 100644 --- a/src/java/com/threerings/presents/server/PresentsClient.java +++ b/src/java/com/threerings/presents/server/PresentsClient.java @@ -90,14 +90,14 @@ public class PresentsClient * * @param rl when this method is finished with its business and the old client object can * be destroyed, the result listener should be called. */ - public void changeReported (ClientObject newObji, ResultListener rl); + void changeReported (ClientObject newObji, ResultListener rl); /** Called when the user change is completed, the old client object is destroyed and all * updates are committed. */ - public void changeCompleted (ClientObject newObj); + void changeCompleted (ClientObject newObj); /** Called if some failure occurs during the user change process. */ - public void changeFailed (Exception cause); + void changeFailed (Exception cause); } /** diff --git a/src/java/com/threerings/presents/server/RebootManager.java b/src/java/com/threerings/presents/server/RebootManager.java index 66f1166e0..478b99f56 100644 --- a/src/java/com/threerings/presents/server/RebootManager.java +++ b/src/java/com/threerings/presents/server/RebootManager.java @@ -59,7 +59,7 @@ public abstract class RebootManager * @param msLeft the approximate number of milliseconds left prior to * the shutdown. */ - public void shutdownPlanned (int warningsLeft, long msLeft); + void shutdownPlanned (int warningsLeft, long msLeft); } /** diff --git a/src/java/com/threerings/presents/server/ReportManager.java b/src/java/com/threerings/presents/server/ReportManager.java index 71f280fa5..9fe4daf8a 100644 --- a/src/java/com/threerings/presents/server/ReportManager.java +++ b/src/java/com/threerings/presents/server/ReportManager.java @@ -50,7 +50,7 @@ public class ReportManager * @param reset if true, all accumulating stats should be reset, if false they should be * allowed to continue to accumulate. */ - public void appendReport (StringBuilder buffer, long now, long sinceLast, boolean reset); + void appendReport (StringBuilder buffer, long now, long sinceLast, boolean reset); } /** diff --git a/src/java/com/threerings/presents/server/ShutdownManager.java b/src/java/com/threerings/presents/server/ShutdownManager.java index fe296217e..e5c95ddd7 100644 --- a/src/java/com/threerings/presents/server/ShutdownManager.java +++ b/src/java/com/threerings/presents/server/ShutdownManager.java @@ -45,7 +45,7 @@ public class ShutdownManager /** * Called when the server is shutting down. */ - public void shutdown (); + void shutdown (); } public static enum Constraint { RUNS_BEFORE, RUNS_AFTER }; diff --git a/src/java/com/threerings/presents/server/net/ConnectionManager.java b/src/java/com/threerings/presents/server/net/ConnectionManager.java index 2fe124295..98c43bb8a 100644 --- a/src/java/com/threerings/presents/server/net/ConnectionManager.java +++ b/src/java/com/threerings/presents/server/net/ConnectionManager.java @@ -945,7 +945,7 @@ public class ConnectionManager extends LoopingThread /** Used to handle partial writes in {@link #writeMessage}. */ protected static interface PartialWriteHandler { - public void handlePartialWrite (Connection conn, ByteBuffer buffer); + void handlePartialWrite (Connection conn, ByteBuffer buffer); } /** diff --git a/src/java/com/threerings/presents/server/net/ConnectionObserver.java b/src/java/com/threerings/presents/server/net/ConnectionObserver.java index 61a26b8de..7a785cd56 100644 --- a/src/java/com/threerings/presents/server/net/ConnectionObserver.java +++ b/src/java/com/threerings/presents/server/net/ConnectionObserver.java @@ -46,8 +46,7 @@ public interface ConnectionObserver * @param req The auth request provided by the client. * @param rsp The auth response provided to the client. */ - public void connectionEstablished ( - Connection conn, AuthRequest req, AuthResponse rsp); + void connectionEstablished (Connection conn, AuthRequest req, AuthResponse rsp); /** * Called if a connection fails for any reason. If a connection fails, @@ -58,12 +57,12 @@ public interface ConnectionObserver * @param conn The connection in that failed. * @param fault The exception associated with the failure. */ - public void connectionFailed (Connection conn, IOException fault); + void connectionFailed (Connection conn, IOException fault); /** * Called when a connection has been closed in an orderly manner. * * @param conn The recently closed connection. */ - public void connectionClosed (Connection conn); + void connectionClosed (Connection conn); } diff --git a/src/java/com/threerings/presents/server/net/MessageHandler.java b/src/java/com/threerings/presents/server/net/MessageHandler.java index 1525878f5..738278df6 100644 --- a/src/java/com/threerings/presents/server/net/MessageHandler.java +++ b/src/java/com/threerings/presents/server/net/MessageHandler.java @@ -33,5 +33,5 @@ public interface MessageHandler * Called when a complete message has been parsed from incoming * network data. */ - public void handleMessage (UpstreamMessage message); + void handleMessage (UpstreamMessage message); } diff --git a/src/java/com/threerings/presents/server/net/NetEventHandler.java b/src/java/com/threerings/presents/server/net/NetEventHandler.java index 5f4fd8faa..c30f44b3a 100644 --- a/src/java/com/threerings/presents/server/net/NetEventHandler.java +++ b/src/java/com/threerings/presents/server/net/NetEventHandler.java @@ -41,7 +41,7 @@ public interface NetEventHandler * @return the number of bytes read from the network as a result of * handling this event. */ - public int handleEvent (long when); + int handleEvent (long when); /** * Called to ensure that this channel has not been idle for longer @@ -50,5 +50,5 @@ public interface NetEventHandler * @return true if the handler is idle (in which case it will be * closed shortly), false if it is not. */ - public boolean checkIdle (long now); + boolean checkIdle (long now); } diff --git a/src/java/com/threerings/presents/tools/GenServiceTask.java b/src/java/com/threerings/presents/tools/GenServiceTask.java index 991339da2..c671e6783 100644 --- a/src/java/com/threerings/presents/tools/GenServiceTask.java +++ b/src/java/com/threerings/presents/tools/GenServiceTask.java @@ -110,8 +110,7 @@ public class GenServiceTask extends InvocationTask } } - /** Used to track services for which we should not generate a provider - * interface. */ + /** Used to track services for which we should not generate a provider interface. */ public class Providerless { public void setService (String className) diff --git a/src/java/com/threerings/presents/tools/GenUtil.java b/src/java/com/threerings/presents/tools/GenUtil.java index 0fa27c797..57912ed0b 100644 --- a/src/java/com/threerings/presents/tools/GenUtil.java +++ b/src/java/com/threerings/presents/tools/GenUtil.java @@ -229,8 +229,7 @@ public class GenUtil extends com.samskivert.util.GenUtil // make sure we found something if (name == null) { - throw new IOException( - "Unable to locate class or interface name in " + source + "."); + throw new IOException("Unable to locate class or interface name in " + source + "."); } // prepend the package name to get a name we can Class.forName() diff --git a/src/java/com/threerings/presents/util/PresentsContext.java b/src/java/com/threerings/presents/util/PresentsContext.java index 44e1c958a..c3df79952 100644 --- a/src/java/com/threerings/presents/util/PresentsContext.java +++ b/src/java/com/threerings/presents/util/PresentsContext.java @@ -27,28 +27,27 @@ import com.threerings.presents.client.Client; import com.threerings.presents.dobj.DObjectManager; /** - * Provides access to standard services needed by code that is part of or - * uses the Presents package. + * Provides access to standard services needed by code that is part of or uses the Presents + * package. */ public interface PresentsContext { /** - * Provides a configuration object from which various services can - * obtain configuration values and via the properties file that forms - * the basis of the configuration object, those services can be - * customized. + * Provides a configuration object from which various services can obtain configuration values + * and via the properties file that forms the basis of the configuration object, those services + * can be customized. */ - public Config getConfig (); + Config getConfig (); /** - * Returns a reference to the client. This reference should be valid - * for the life of the application. + * Returns a reference to the client. This reference should be valid for the life of the + * application. */ - public Client getClient (); + Client getClient (); /** - * Returns a reference to the distributed object manager. This - * reference is only valid for the duration of a session. + * Returns a reference to the distributed object manager. This reference is only valid for the + * duration of a session. */ - public DObjectManager getDObjectManager (); + DObjectManager getDObjectManager (); } diff --git a/src/java/com/threerings/util/signal/SignalManager.java b/src/java/com/threerings/util/signal/SignalManager.java index 1f0f48afb..809294577 100644 --- a/src/java/com/threerings/util/signal/SignalManager.java +++ b/src/java/com/threerings/util/signal/SignalManager.java @@ -141,7 +141,7 @@ public class SignalManager * @return true if the signal handler should remain registered, false if it should be * removed. */ - public boolean signalReceived (int signal); + boolean signalReceived (int signal); } /**