public interface DOMRpcService extends DOMService
DOMService which allows clients to invoke RPCs. The conceptual model of this
service is that of a dynamic router, where the set of available RPC services can change
dynamically. The service allows users to add a listener to track the process of
RPCs becoming available.| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.CheckedFuture<DOMRpcResult,DOMRpcException> |
invokeRpc(SchemaPath type,
NormalizedNode<?,?> input)
Initiate invocation of an RPC.
|
<T extends DOMRpcAvailabilityListener> |
registerRpcListener(T listener)
Register a
DOMRpcAvailabilityListener with this service to receive notifications
about RPC implementations becoming (un)available. |
@Nonnull com.google.common.util.concurrent.CheckedFuture<DOMRpcResult,DOMRpcException> invokeRpc(@Nonnull SchemaPath type, @Nullable NormalizedNode<?,?> input)
type - SchemaPath of the RPC to be invokedinput - Input arguments, null if the RPC does not take any.CheckedFuture which will return either a result structure,
or report a subclass of DOMRpcException reporting a transport
error.@Nonnull <T extends DOMRpcAvailabilityListener> org.opendaylight.yangtools.concepts.ListenerRegistration<T> registerRpcListener(@Nonnull T listener)
DOMRpcAvailabilityListener with this service to receive notifications
about RPC implementations becoming (un)available. The listener will be invoked with the
current implementations reported and will be kept uptodate as implementations come and go.
Users should note that using a listener does not necessarily mean that invokeRpc(SchemaPath, NormalizedNode)
will not report a failure due to DOMRpcImplementationNotAvailableException and
need to be ready to handle it. Implementations are encouraged to take reasonable precautions
to prevent this scenario from occurring.listener - DOMRpcAvailabilityListener instance to registerDOMRpcAvailabilityListenerRegistration representing this registration. Performing
a DOMRpcAvailabilityListenerRegistration#close() will cancel it. Returned object
is guaranteed to be non-null.Copyright © 2016 OpenDaylight. All rights reserved.