public final class DOMRpcRouter extends Object implements AutoCloseable, DOMRpcService, DOMRpcProviderService, org.opendaylight.yangtools.yang.model.api.SchemaContextListener
| Constructor and Description |
|---|
DOMRpcRouter() |
DOMRpcRouter(org.opendaylight.mdsal.dom.api.DOMRpcService delegateRpcService,
org.opendaylight.mdsal.dom.api.DOMRpcProviderService delegateRpcProviderService) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.google.common.util.concurrent.CheckedFuture<DOMRpcResult,DOMRpcException> |
invokeRpc(org.opendaylight.yangtools.yang.model.api.SchemaPath type,
org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> input)
Initiate invocation of an RPC.
|
void |
onGlobalContextUpdated(org.opendaylight.yangtools.yang.model.api.SchemaContext context) |
<T extends DOMRpcImplementation> |
registerRpcImplementation(T implementation,
DOMRpcIdentifier... rpcs)
Register an
DOMRpcImplementation object with this service. |
<T extends DOMRpcImplementation> |
registerRpcImplementation(T implementation,
Set<DOMRpcIdentifier> rpcs)
Register an
DOMRpcImplementation object with this service. |
<T extends DOMRpcAvailabilityListener> |
registerRpcListener(T listener)
Register a
DOMRpcAvailabilityListener with this service to receive notifications
about RPC implementations becoming (un)available. |
public DOMRpcRouter()
public DOMRpcRouter(org.opendaylight.mdsal.dom.api.DOMRpcService delegateRpcService,
org.opendaylight.mdsal.dom.api.DOMRpcProviderService delegateRpcProviderService)
public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(T implementation, DOMRpcIdentifier... rpcs)
DOMRpcProviderServiceDOMRpcImplementation object with this service.registerRpcImplementation in interface DOMRpcProviderServiceimplementation - RPC implementation, must not be nullrpcs - Array of supported RPC identifiers. Must not be null, empty, or contain a null element.
Each identifier is added exactly once, no matter how many times it occurs.DOMRpcImplementationRegistration object, guaranteed to be non-null.public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(T implementation, Set<DOMRpcIdentifier> rpcs)
DOMRpcProviderServiceDOMRpcImplementation object with this service.registerRpcImplementation in interface DOMRpcProviderServiceimplementation - RPC implementation, must not be nullrpcs - Set of supported RPC identifiers. Must not be null, empty, or contain a null element.DOMRpcImplementationRegistration object, guaranteed to be non-null.public com.google.common.util.concurrent.CheckedFuture<DOMRpcResult,DOMRpcException> invokeRpc(org.opendaylight.yangtools.yang.model.api.SchemaPath type, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> input)
DOMRpcServiceinvokeRpc in interface DOMRpcServicetype - 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.public <T extends DOMRpcAvailabilityListener> org.opendaylight.yangtools.concepts.ListenerRegistration<T> registerRpcListener(T listener)
DOMRpcServiceDOMRpcAvailabilityListener 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 of this interface are encouraged to take reasonable precautions to prevent this scenario from occurring.
registerRpcListener in interface DOMRpcServicelistener - DOMRpcAvailabilityListener instance to registerListenerRegistration representing this registration. Performing
a ListenerRegistration.close() will cancel it. Returned object
is guaranteed to be non-null.public void close()
close in interface AutoCloseablepublic void onGlobalContextUpdated(org.opendaylight.yangtools.yang.model.api.SchemaContext context)
onGlobalContextUpdated in interface org.opendaylight.yangtools.yang.model.api.SchemaContextListenerCopyright © 2019 OpenDaylight. All rights reserved.