From 46e048ab4acaf19cc9a1d5ba7f2d178e9ea139ef Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Sat, 17 Jan 2009 02:21:44 +0000 Subject: [PATCH] Change the default behavior of handleSuccess: if the listener is a ConfirmListener, do it! Hopefully this doesn't fork anything up. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5636 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/util/PersistingUnit.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/util/PersistingUnit.java b/src/java/com/threerings/presents/util/PersistingUnit.java index 8e99764fe..19045315c 100644 --- a/src/java/com/threerings/presents/util/PersistingUnit.java +++ b/src/java/com/threerings/presents/util/PersistingUnit.java @@ -72,10 +72,14 @@ public abstract class PersistingUnit extends Invoker.Unit throws Exception; /** - * Handles the success case, which by default is to do nothing. + * Handles the success case, which by default posts a response to a ConfirmListener. + * If you need something else, or to repond to a ResultListener, you'll need to override this. */ public void handleSuccess () { + if (_listener instanceof InvocationService.ConfirmListener) { + reportRequestProcessed(); + } } /**