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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class PlaceRegistry
|
||||
{
|
||||
final Iterator<PlaceManager> itr = _pmgrs.values().iterator();
|
||||
return new Iterator<PlaceObject>() {
|
||||
public boolean hasNext (){
|
||||
public boolean hasNext () {
|
||||
return itr.hasNext();
|
||||
}
|
||||
public PlaceObject next () {
|
||||
@@ -246,7 +246,7 @@ public class PlaceRegistry
|
||||
throws Exception
|
||||
{
|
||||
@SuppressWarnings("unchecked") Class<? extends PlaceManager> clazz =
|
||||
(Class<? extends PlaceManager>) Class.forName(config.getManagerClassName());
|
||||
(Class<? extends PlaceManager>)Class.forName(config.getManagerClassName());
|
||||
return _injector.getInstance(clazz);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
*
|
||||
* <pre>
|
||||
* 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);
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* From this interface, a <code>LocationProvider</code> 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 <code>LocationProvider</code> 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:
|
||||
*
|
||||
* <pre>
|
||||
* 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;
|
||||
* }
|
||||
* </pre>
|
||||
@@ -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:
|
||||
*
|
||||
* <pre>
|
||||
* // Used to communicate responses to <code>moveTo</code> requests.
|
||||
* public interface MoveListener extends InvocationListener
|
||||
* {
|
||||
* // Called in response to a successful <code>moveTo</code>
|
||||
* // request.
|
||||
* public void moveSucceeded (PlaceConfig config);
|
||||
* // Called in response to a successful <code>moveTo</code> request.
|
||||
* void moveSucceeded (PlaceConfig config);
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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<T>
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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<? extends PresentsClient> getClientClass (AuthRequest areq);
|
||||
Class<? extends PresentsClient> getClientClass (AuthRequest areq);
|
||||
|
||||
/**
|
||||
* Returns the {@link ClientResolver} derived class to use to resolve a client with the
|
||||
* specified username.
|
||||
*/
|
||||
public Class <? extends ClientResolver> getClientResolverClass (Name username);
|
||||
Class <? extends ClientResolver> getClientResolverClass (Name username);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 ();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user