RpcConsumerRegistry
instead@Deprecated public interface RpcConsumerRegistry extends BindingAwareService, BindingService
RPC implementations are registered using the RpcProviderRegistry
.
Modifier and Type | Method and Description |
---|---|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
getRpcService(Class<T> serviceInterface)
Deprecated.
Returns an implementation of a requested RPC service.
|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> T getRpcService(Class<T> serviceInterface)
The 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
}
});
serviceInterface
- the interface of the RPC Service. Typically this is an interface generated
from a YANG model.Copyright © 2019 OpenDaylight. All rights reserved.