I - The type of the RPC input.O - The type of the RPC output.public abstract class NodeRpcInvocation<I,O> extends RpcInvocation<I,O>
NodeRpcInvocation describes an invocation of RPC routed to the
specific switch.| Constructor and Description |
|---|
NodeRpcInvocation(NodeRpcWatcher w,
I in,
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nref,
Future<org.opendaylight.yangtools.yang.common.RpcResult<O>> f)
Construct a new instance.
|
NodeRpcInvocation(NodeRpcWatcher w,
I in,
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nref,
Future<org.opendaylight.yangtools.yang.common.RpcResult<O>> f,
boolean discon)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Complete the observation of the RPC invocation.
|
String |
getNode()
Return the identifier of the node associated with the RPC invocation.
|
NodeRpcWatcher |
getNodeRpcWatcher()
Return the node RPC watcher.
|
O |
getResult(long timeout,
TimeUnit unit,
org.slf4j.Logger logger)
Wait for the RPC execution to complete, and return the result.
|
boolean |
isDisconnected()
Determine whether the secure channel for the target node was
disconnected or not.
|
boolean |
isNodeRemoved()
Determine whether the target node was removed or not.
|
boolean |
needErrorLog(Collection<org.opendaylight.yangtools.yang.common.RpcError> errors)
Determine whether the RPC failure should be logged or not.
|
boolean |
needErrorLog(Throwable cause)
Determine whether the RPC failure should be logged or not.
|
boolean |
onNodeRemoved()
Invoked when the target node has been removed.
|
void |
start()
Start the observation of the RPC invocation.
|
getFuture, getInput, getInputForLogclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamepublic NodeRpcInvocation(NodeRpcWatcher w, I in, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nref, Future<org.opendaylight.yangtools.yang.common.RpcResult<O>> f)
An error caused by secure channel disconnection will be logged.
w - The node RPC watcher.in - The RPC input.nref - Reference to the target node.f - The future associated with the RPC execution with
in.public NodeRpcInvocation(NodeRpcWatcher w, I in, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef nref, Future<org.opendaylight.yangtools.yang.common.RpcResult<O>> f, boolean discon)
w - The node RPC watcher.in - The RPC input.nref - Reference to the target node.f - The future associated with the RPC execution with
in.discon - Determine whether an error caused by disconnection of
OpenFlow secure channel should be logged or not.public final NodeRpcWatcher getNodeRpcWatcher()
public final String getNode()
public final boolean onNodeRemoved()
true if the RPC invocation has been canceled.
false if the RPC invocation has already completed.public final boolean isNodeRemoved()
true if the target node was removed.
false otherwise.public final boolean isDisconnected()
true if the secure channel for the target node was
disconnected. false otherwise.public final void start()
public final void complete()
public final O getResult(long timeout, TimeUnit unit, org.slf4j.Logger logger) throws VTNException
The RPC invocation will be canceled if the target node is removed.
getResult in class RpcInvocation<I,O>timeout - The maximum time to wait.unit - The time unit of the timeout argument.logger - A Logger instance.VTNException - An error occurred.public final boolean needErrorLog(@Nonnull Throwable cause)
needErrorLog in class RpcInvocation<I,O>cause - An throwable thrown by the RPC implementation.true if the RPC failure should be logged.
false otherwise.public boolean needErrorLog(@Nonnull Collection<org.opendaylight.yangtools.yang.common.RpcError> errors)
needErrorLog in interface RpcRequestneedErrorLog in class RpcInvocation<I,O>errors - A collection of RPC errors returned by the RPC
implementation.true if the RPC failure should be logged.
false otherwise.Copyright © 2018 OpenDaylight. All rights reserved.