From 35f9b6cc1dc499109f3aa2a8e1ab749567b2e095 Mon Sep 17 00:00:00 2001 From: mdb Date: Tue, 21 Sep 2004 02:34:11 +0000 Subject: [PATCH] A no-op ResultListener, useful on certain occasions. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1504 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/ResultListener.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/samskivert/src/java/com/samskivert/util/ResultListener.java b/projects/samskivert/src/java/com/samskivert/util/ResultListener.java index b93ad587..7baa36cb 100644 --- a/projects/samskivert/src/java/com/samskivert/util/ResultListener.java +++ b/projects/samskivert/src/java/com/samskivert/util/ResultListener.java @@ -47,4 +47,13 @@ public interface ResultListener * reason for failure. */ public void requestFailed (Exception cause); + + /** Useful when you want to allow optional result listeners but don't + * want to have to check before calling. */ + public static final ResultListener NOOP = new ResultListener() { + public void requestCompleted (Object result) { + } + public void requestFailed (Exception cause) { + } + }; }