Added ResultListener.NOOP which can be used like so:

foo.doSomeThing(bar, new ResultListener.NOOP<MyType>());


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1836 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-04-28 22:54:29 +00:00
parent c3498b63e2
commit 70e77b4040
@@ -36,6 +36,15 @@ package com.samskivert.util;
*/
public interface ResultListener<T>
{
/** A result listener that does nothing for cases where that is an
* appropriate behavior. */
public static class NOOP<T> implements ResultListener<T> {
public void requestCompleted (T result) {
}
public void requestFailed (Exception cause) {
}
};
/**
* Called to communicate that the request succeeded and that the
* result is available.