Widening.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4756 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-07-12 20:30:51 +00:00
parent 1ea3195551
commit 102dd71f8d
3 changed files with 16 additions and 22 deletions
@@ -29,11 +29,9 @@ import com.threerings.presents.data.InvocationCodes;
import com.threerings.presents.server.InvocationException;
/**
* Adapts the response from a {@link ResultListener} to a {@link
* ConfirmListener} if the failure is an instance fo {@link
* InvocationException} the message will be passed on to the confirm
* listener, otherwise they will be provided with {@link
* InvocationCodes#INTERNAL_ERROR}.
* Adapts the response from a {@link ResultListener} to a {@link ConfirmListener} if the failure is
* an instance fo {@link InvocationException} the message will be passed on to the confirm
* listener, otherwise they will be provided with {@link InvocationCodes#INTERNAL_ERROR}.
*/
public class ConfirmAdapter implements ResultListener
{
@@ -29,11 +29,10 @@ import com.threerings.presents.client.InvocationService;
import com.threerings.presents.data.InvocationCodes;
/**
* Simplifies a common pattern which is to post an {@link Invoker} unit which
* does some database operation and then calls back to an {@link
* InvocationService.InvocationListener} of some sort. If the database operation
* fails, the error will be logged and the result listener will be replied to
* with {@link InvocationCodes#INTERNAL_ERROR}.
* Simplifies a common pattern which is to post an {@link Invoker} unit which does some database
* operation and then calls back to an {@link InvocationService.InvocationListener} of some
* sort. If the database operation fails, the error will be logged and the result listener will be
* replied to with {@link InvocationCodes#INTERNAL_ERROR}.
*/
public abstract class PersistingUnit extends Invoker.Unit
{
@@ -50,9 +49,8 @@ public abstract class PersistingUnit extends Invoker.Unit
}
/**
* This method is where the unit performs its persistent actions. Any
* persistence exception will be caught and logged along with the output
* from {@link #getFailureMessage}, if any.
* This method is where the unit performs its persistent actions. Any persistence exception
* will be caught and logged along with the output from {@link #getFailureMessage}, if any.
*/
public abstract void invokePersistent ()
throws PersistenceException;
@@ -65,8 +63,8 @@ public abstract class PersistingUnit extends Invoker.Unit
}
/**
* Handles the failure case by logging the error and reporting an internal
* error to the listener.
* Handles the failure case by logging the error and reporting an internal error to the
* listener.
*/
public void handleFailure (PersistenceException error)
{
@@ -76,8 +74,8 @@ public abstract class PersistingUnit extends Invoker.Unit
}
/**
* Provides a custom failure message in the event that the persistent
* action fails. This will be logged along with the exception.
* Provides a custom failure message in the event that the persistent action fails. This will
* be logged along with the exception.
*/
public String getFailureMessage ()
{
@@ -29,11 +29,9 @@ import com.threerings.presents.data.InvocationCodes;
import com.threerings.presents.server.InvocationException;
/**
* Adapts the response from a {@link ResultListener} to an
* <code>InvocationService.ResultListener</code> if the failure is an
* instance fo {@link InvocationException} the message will be passed on
* to the result listener, otherwise they will be provided with {@link
* InvocationCodes#INTERNAL_ERROR}.
* Adapts the response from a {@link ResultListener} to an InvocationService.ResultListener if the
* failure is an instance of {@link InvocationException} the message will be passed on to the
* result listener, otherwise they will be provided with {@link InvocationCodes#INTERNAL_ERROR}.
*/
public class ResultAdapter<T> implements ResultListener<T>
{