Let's add a couple more very handy helper methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4891 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -99,6 +99,24 @@ public abstract class PersistingUnit extends Invoker.Unit
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If the listener is known to be a ConfirmListener, this will cast it and report that the
|
||||
* request was processed.
|
||||
*/
|
||||
protected void reportRequestProcessed ()
|
||||
{
|
||||
((InvocationService.ConfirmListener)_listener).requestProcessed();
|
||||
}
|
||||
|
||||
/**
|
||||
* If the listener is known to be a ResultListener, this will cast it and report that the
|
||||
* request was processed.
|
||||
*/
|
||||
protected void reportRequestProcessed (Object result )
|
||||
{
|
||||
((InvocationService.ResultListener)_listener).requestProcessed(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a custom failure message in the event that the persistent action fails. This will
|
||||
* be logged along with the exception.
|
||||
|
||||
Reference in New Issue
Block a user