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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user