diff --git a/src/java/com/samskivert/util/ResultHandler.java b/src/java/com/samskivert/util/ResultHandler.java index faaaed3f..2d15bfcf 100644 --- a/src/java/com/samskivert/util/ResultHandler.java +++ b/src/java/com/samskivert/util/ResultHandler.java @@ -27,6 +27,16 @@ public class ResultHandler } } + /** + * Peeks at the result, which will be returned if already available. If the result is pending + * or there was an error, this method returns null (which, however, will also be + * returned if the actual result was null). + */ + public T peekResult () + { + return (_error == null && _list == null) ? _result : null; + } + // documentation inherited from interface ResultListener public void requestCompleted (T result) {