@Deprecated public class RootBindingAwareBroker extends Object implements org.opendaylight.yangtools.concepts.Mutable, org.opendaylight.yangtools.concepts.Identifiable<String>, BindingAwareBroker, AutoCloseable, RpcProviderRegistry
| Modifier and Type | Class and Description |
|---|---|
static class |
RootBindingAwareBroker.RootSalInstance
Deprecated.
|
BindingAwareBroker.ConsumerContext, BindingAwareBroker.ProviderContext, BindingAwareBroker.RoutedRpcRegistration<T extends org.opendaylight.yangtools.yang.binding.RpcService>, BindingAwareBroker.RpcRegistration<T extends org.opendaylight.yangtools.yang.binding.RpcService>| Constructor and Description |
|---|
RootBindingAwareBroker(String instanceName)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
addRoutedRpcImplementation(Class<T> type,
T implementation)
Deprecated.
Registers an implementation of the given routed RPC service interface.
|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
addRpcImplementation(Class<T> type,
T implementation)
Deprecated.
Registers a global implementation of the provided RPC service interface.
|
void |
close()
Deprecated.
|
String |
getIdentifier()
Deprecated.
|
MountPointService |
getMountService()
Deprecated.
|
NotificationProviderService |
getNotificationBroker()
Deprecated.
|
NotificationPublishService |
getNotificationPublishService()
Deprecated.
|
RootBindingAwareBroker.RootSalInstance |
getRoot()
Deprecated.
|
RpcProviderRegistry |
getRpcBroker()
Deprecated.
|
RpcProviderRegistry |
getRpcProviderRegistry()
Deprecated.
|
<T extends org.opendaylight.yangtools.yang.binding.RpcService> |
getRpcService(Class<T> module)
Deprecated.
Returns an implementation of a requested RPC service.
|
BindingAwareBroker.ConsumerContext |
registerConsumer(BindingAwareConsumer consumer)
Deprecated.
Registers the
BindingAwareConsumer, which will use the SAL layer. |
BindingAwareBroker.ConsumerContext |
registerConsumer(BindingAwareConsumer consumer,
org.osgi.framework.BundleContext ctx)
Deprecated.
|
BindingAwareBroker.ProviderContext |
registerProvider(BindingAwareProvider provider)
Deprecated.
Registers the
BindingAwareProvider, which will use the SAL layer. |
BindingAwareBroker.ProviderContext |
registerProvider(BindingAwareProvider provider,
org.osgi.framework.BundleContext ctx)
Deprecated.
|
<L extends RouteChangeListener<RpcContextIdentifier,org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>>> |
registerRouteChangeListener(L listener)
Deprecated.
|
void |
setDataBroker(DataBroker asyncDataBroker)
Deprecated.
|
void |
setMountService(MountPointService mount)
Deprecated.
|
void |
setNotificationBroker(NotificationProviderService notificationBroker)
Deprecated.
|
void |
setNotificationPublishService(NotificationPublishService notificationPublishService)
Deprecated.
|
void |
setRpcBroker(RpcProviderRegistry rpcBroker)
Deprecated.
|
void |
start()
Deprecated.
|
public RootBindingAwareBroker(String instanceName)
public String getIdentifier()
getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<String>public RootBindingAwareBroker.RootSalInstance getRoot()
public NotificationProviderService getNotificationBroker()
public NotificationPublishService getNotificationPublishService()
public RpcProviderRegistry getRpcProviderRegistry()
public RpcProviderRegistry getRpcBroker()
public MountPointService getMountService()
public void setDataBroker(DataBroker asyncDataBroker)
public void setMountService(MountPointService mount)
public void setRpcBroker(RpcProviderRegistry rpcBroker)
public void setNotificationBroker(NotificationProviderService notificationBroker)
public void setNotificationPublishService(NotificationPublishService notificationPublishService)
public void start()
public BindingAwareBroker.ConsumerContext registerConsumer(BindingAwareConsumer consumer, org.osgi.framework.BundleContext ctx)
registerConsumer in interface BindingAwareBrokerpublic BindingAwareBroker.ConsumerContext registerConsumer(BindingAwareConsumer consumer)
BindingAwareBrokerBindingAwareConsumer, which will use the SAL layer.
Note that consumer could register additional functionality at later point by using service and functionality specific APIs.
The consumer is required to use returned session for all communication
with broker or one of the broker services. The session is announced to
the consumer by invoking
BindingAwareConsumer#onSessionInitialized(ConsumerContext).
registerConsumer in interface BindingAwareBrokerconsumer - Consumer to be registered.public BindingAwareBroker.ProviderContext registerProvider(BindingAwareProvider provider, org.osgi.framework.BundleContext ctx)
registerProvider in interface BindingAwareBrokerpublic BindingAwareBroker.ProviderContext registerProvider(BindingAwareProvider provider)
BindingAwareBrokerBindingAwareProvider, which will use the SAL layer.
During the registration, the broker obtains the initial functionality from consumer, using the BindingAwareProvider#getImplementations(), and register that functionality into system and concrete infrastructure services.
Note that provider could register additional functionality at later point by using service and functionality specific APIs.
The consumer is required to use returned session for all
communication with broker or one of the broker services. The session is
announced to the consumer by invoking
BindingAwareProvider#onSessionInitiated(ProviderContext).
registerProvider in interface BindingAwareBrokerprovider - Provider to be registered.public void close()
close in interface AutoCloseablepublic <T extends org.opendaylight.yangtools.yang.binding.RpcService> BindingAwareBroker.RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation) throws IllegalStateException
RpcProviderRegistry
See the class documentation for information and example on
how to use routed RPCs.
addRoutedRpcImplementation in interface RpcProviderRegistrytype - the YANG-generated interface of the RPC Service for which to register.implementation - the implementation instance to register.BindingAwareBroker.RpcRegistration.close() should be called to unregister the implementation
and all previously registered paths when no longer needed.IllegalStateException - if the supplied RPC interface is not a routed RPC type.public <T extends org.opendaylight.yangtools.yang.binding.RpcService> BindingAwareBroker.RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation) throws IllegalStateException
RpcProviderRegistryaddRpcImplementation in interface RpcProviderRegistrytype - the YANG-generated interface of the RPC Service for which to register.implementation - "the implementation of the RPC service interface.BindingAwareBroker.RpcRegistration.close().IllegalStateException - if the supplied RPC interface is a routed RPC type.public <T extends org.opendaylight.yangtools.yang.binding.RpcService> T getRpcService(Class<T> module)
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 RpcConsumerRegistrymodule - the interface of the RPC Service. Typically this is an interface generated
from a YANG model.public <L extends RouteChangeListener<RpcContextIdentifier,org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>>> org.opendaylight.yangtools.concepts.ListenerRegistration<L> registerRouteChangeListener(L listener)
registerRouteChangeListener in interface RouteChangePublisher<RpcContextIdentifier,org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>>Copyright © 2019 OpenDaylight. All rights reserved.