Dave points out that we can extend FailureListener here and save ourselves a
noopy method. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2464 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -25,8 +25,7 @@ import java.util.logging.Level;
|
|||||||
/**
|
/**
|
||||||
* A ResultListener that does nothing on success and logs a warning message on failure, that's all.
|
* A ResultListener that does nothing on success and logs a warning message on failure, that's all.
|
||||||
*/
|
*/
|
||||||
public class ComplainingListener<T>
|
public class ComplainingListener<T> extends FailureListener<T>
|
||||||
implements ResultListener<T>
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Creates a listener that will log failures to the supplied logger.
|
* Creates a listener that will log failures to the supplied logger.
|
||||||
@@ -56,10 +55,7 @@ public class ComplainingListener<T>
|
|||||||
_jlogger = logger;
|
_jlogger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited from interface ResultListener
|
// from interface ResultListener
|
||||||
public void requestCompleted (T result) { /* nada */ }
|
|
||||||
|
|
||||||
// documentation inherited from interface ResultListener
|
|
||||||
public void requestFailed (Exception cause)
|
public void requestFailed (Exception cause)
|
||||||
{
|
{
|
||||||
Object[] args = _args != null ? ArrayUtil.append(_args, cause) : new Object[] { cause };
|
Object[] args = _args != null ? ArrayUtil.append(_args, cause) : new Object[] { cause };
|
||||||
|
|||||||
Reference in New Issue
Block a user