public class BindingDOMRpcServiceAdapter extends Object implements RpcConsumerRegistry
| Modifier and Type | Field and Description |
|---|---|
protected static org.opendaylight.controller.md.sal.binding.impl.BindingDOMAdapterBuilder.Factory<RpcConsumerRegistry> |
BUILDER_FACTORY |
| Constructor and Description |
|---|
BindingDOMRpcServiceAdapter(DOMRpcService domService,
BindingToNormalizedNodeCodec codec) |
| Modifier and Type | Method and Description |
|---|---|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
getRpcService(Class<T> rpcService)
Returns an implementation of a requested RPC service.
|
protected static final org.opendaylight.controller.md.sal.binding.impl.BindingDOMAdapterBuilder.Factory<RpcConsumerRegistry> BUILDER_FACTORY
public BindingDOMRpcServiceAdapter(DOMRpcService domService, BindingToNormalizedNodeCodec codec)
public <T extends org.opendaylight.yangtools.yang.binding.RpcService> T getRpcService(Class<T> rpcService)
RpcConsumerRegistryThe returned instance is not an actual implementation of the RPC service interface, but a proxy implementation of the interface that forwards to an actual implementation, if any.
The following describes the behavior of the proxy when invoking RPC methods:
IllegalStateException.IllegalArgumentException is thrown.
final Future<RpcResult<SomeRpcOutput>> future = someRpcService.someRpc( ... );
Futures.addCallback(future,
new FutureCallback<RpcResult<SomeRpcOutput>>() {
public void onSuccess(RpcResult<SomeRpcOutput> result) {
// process result ...
}
public void onFailure(Throwable t) {
// RPC failed
}
});
getRpcService in interface RpcConsumerRegistryrpcService - the interface of the RPC Service. Typically this is an interface generated
from a YANG model.Copyright © 2019 OpenDaylight. All rights reserved.