From 4c4d253974760d93086077b967bbb51d63eb101d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 3 Dec 2007 19:54:58 +0000 Subject: [PATCH] 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 --- .../presents/util/PersistingUnit.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/java/com/threerings/presents/util/PersistingUnit.java b/src/java/com/threerings/presents/util/PersistingUnit.java index ffdd25bbd..c319546a8 100644 --- a/src/java/com/threerings/presents/util/PersistingUnit.java +++ b/src/java/com/threerings/presents/util/PersistingUnit.java @@ -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.