T
- the type of result handler wrapped by this class.public class DefaultResultHandler<T extends Result> extends java.lang.Object implements ResultHandler
This class is provided for convenience only. Override the appropriate handle...() method to intercept the appropriate result.
Constructor and Description |
---|
DefaultResultHandler(ResultHandler resultHandler)
Construct a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
handleErrorResult(Result error)
Invoked when the operation has failed.
|
void |
handleResult(Result result)
Invoked when the operation has completed successfully.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleErrorResult, handleResult
public DefaultResultHandler(ResultHandler resultHandler)
resultHandler
- the handler that will receive all calls defined by
the ResultHandler interface.public void handleErrorResult(Result error)
ResultHandler
handleErrorResult
in interface ResultHandler
error
- The error result exception indicating why the operation has failed.public void handleResult(Result result)
ResultHandler
handleResult
in interface ResultHandler
result
- The result of the operation.