T - The type of the object to be returned by the RPC.public class RpcErrorCallback<T> extends Object implements com.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.RpcResult<T>>
FutureCallback used to log error of
asynchronous RPC execution.| Constructor and Description |
|---|
RpcErrorCallback(RpcRequest req,
org.slf4j.Logger log,
String fmt,
Object... args)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onFailure(Throwable t)
Invoked when the RPC has failed.
|
void |
onSuccess(org.opendaylight.yangtools.yang.common.RpcResult<T> result)
Invoked when the RPC has completed.
|
public RpcErrorCallback(RpcRequest req, org.slf4j.Logger log, String fmt, Object... args)
This constructor takes a format string and variable-sized arguments.
An error message is created by String.format(String, Object[])
with specifying the given format string and arguments.
req - An RpcRequest instance that indicates an RPC
request.log - A logger instance.fmt - A format string.args - Arguments for an error message.public void onSuccess(org.opendaylight.yangtools.yang.common.RpcResult<T> result)
onSuccess in interface com.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.RpcResult<T>>result - An object returned by the RPC.Copyright © 2018 OpenDaylight. All rights reserved.