public abstract class ForwardingDOMRpcService extends com.google.common.collect.ForwardingObject implements DOMRpcService
DOMRpcService
which forwards all requests to a backing delegate instance.Constructor and Description |
---|
ForwardingDOMRpcService() |
Modifier and Type | Method and Description |
---|---|
protected abstract @NonNull DOMRpcService |
delegate() |
com.google.common.util.concurrent.FluentFuture<DOMRpcResult> |
invokeRpc(org.opendaylight.yangtools.yang.model.api.SchemaPath type,
org.opendaylight.yangtools.yang.data.api.schema.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. |
protected abstract @NonNull DOMRpcService delegate()
delegate
in class com.google.common.collect.ForwardingObject
public com.google.common.util.concurrent.FluentFuture<DOMRpcResult> invokeRpc(org.opendaylight.yangtools.yang.model.api.SchemaPath type, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> input)
DOMRpcService
invokeRpc
in interface DOMRpcService
type
- SchemaPath of the RPC to be invokedinput
- Input arguments, null if the RPC does not take any.FluentFuture
which will return either a result structure, or report a subclass
of DOMRpcException
reporting a transport error.public <T extends DOMRpcAvailabilityListener> org.opendaylight.yangtools.concepts.ListenerRegistration<T> registerRpcListener(T listener)
DOMRpcService
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
DOMRpcService.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.registerRpcListener
in interface DOMRpcService
listener
- DOMRpcAvailabilityListener
instance to registerListenerRegistration
representing this registration. Performing a
ListenerRegistration.close()
will cancel it. Returned object is guaranteed to be non-null.Copyright © 2019 OpenDaylight. All rights reserved.