Class RootBindingAwareBroker
- java.lang.Object
-
- org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker
-
- All Implemented Interfaces:
AutoCloseable
,BindingService
,RouteChangePublisher<RpcContextIdentifier,InstanceIdentifier<?>>
,BindingAwareBroker
,BindingAwareService
,RpcConsumerRegistry
,RpcProviderRegistry
,Identifiable<String>
,Mutable
,MutationBehaviour<Mutable>
@Deprecated(forRemoval=true) public class RootBindingAwareBroker extends Object implements Mutable, Identifiable<String>, BindingAwareBroker, AutoCloseable, RpcProviderRegistry
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RootBindingAwareBroker.RootSalInstance
Deprecated, for removal: This API element is subject to removal in a future version.-
Nested classes/interfaces inherited from interface org.opendaylight.controller.sal.binding.api.BindingAwareBroker
BindingAwareBroker.ConsumerContext, BindingAwareBroker.ProviderContext, BindingAwareBroker.RoutedRpcRegistration<T extends RpcService>, BindingAwareBroker.RpcRegistration<T extends RpcService>
-
-
Constructor Summary
Constructors Constructor Description RootBindingAwareBroker(String instanceName)
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T extends RpcService>
BindingAwareBroker.RoutedRpcRegistration<T>addRoutedRpcImplementation(Class<T> type, T implementation)
Deprecated, for removal: This API element is subject to removal in a future version.Registers an implementation of the given routed RPC service interface.<T extends RpcService>
BindingAwareBroker.RpcRegistration<T>addRpcImplementation(Class<T> type, T implementation)
Deprecated, for removal: This API element is subject to removal in a future version.Registers a global implementation of the provided RPC service interface.void
close()
Deprecated, for removal: This API element is subject to removal in a future version.String
getIdentifier()
Deprecated, for removal: This API element is subject to removal in a future version.MountPointService
getMountService()
Deprecated, for removal: This API element is subject to removal in a future version.NotificationProviderService
getNotificationBroker()
Deprecated, for removal: This API element is subject to removal in a future version.NotificationPublishService
getNotificationPublishService()
Deprecated, for removal: This API element is subject to removal in a future version.RootBindingAwareBroker.RootSalInstance
getRoot()
Deprecated, for removal: This API element is subject to removal in a future version.RpcProviderRegistry
getRpcBroker()
Deprecated, for removal: This API element is subject to removal in a future version.RpcProviderRegistry
getRpcProviderRegistry()
Deprecated, for removal: This API element is subject to removal in a future version.<T extends RpcService>
TgetRpcService(Class<T> module)
Deprecated, for removal: This API element is subject to removal in a future version.Returns an implementation of a requested RPC service.BindingAwareBroker.ConsumerContext
registerConsumer(BindingAwareConsumer consumer)
Deprecated, for removal: This API element is subject to removal in a future version.Registers theBindingAwareConsumer
, which will use the SAL layer.BindingAwareBroker.ConsumerContext
registerConsumer(BindingAwareConsumer consumer, org.osgi.framework.BundleContext ctx)
Deprecated, for removal: This API element is subject to removal in a future version.BindingAwareBroker.ProviderContext
registerProvider(BindingAwareProvider provider)
Deprecated, for removal: This API element is subject to removal in a future version.Registers theBindingAwareProvider
, which will use the SAL layer.BindingAwareBroker.ProviderContext
registerProvider(BindingAwareProvider provider, org.osgi.framework.BundleContext ctx)
Deprecated, for removal: This API element is subject to removal in a future version.<L extends RouteChangeListener<RpcContextIdentifier,InstanceIdentifier<?>>>
ListenerRegistration<L>registerRouteChangeListener(L listener)
Deprecated, for removal: This API element is subject to removal in a future version.void
setDataBroker(DataBroker asyncDataBroker)
Deprecated, for removal: This API element is subject to removal in a future version.void
setMountService(MountPointService mount)
Deprecated, for removal: This API element is subject to removal in a future version.void
setNotificationBroker(NotificationProviderService notificationBroker)
Deprecated, for removal: This API element is subject to removal in a future version.void
setNotificationPublishService(NotificationPublishService notificationPublishService)
Deprecated, for removal: This API element is subject to removal in a future version.void
setRpcBroker(RpcProviderRegistry rpcBroker)
Deprecated, for removal: This API element is subject to removal in a future version.void
start()
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Constructor Detail
-
RootBindingAwareBroker
public RootBindingAwareBroker(String instanceName)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
getIdentifier
public String getIdentifier()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getIdentifier
in interfaceIdentifiable<String>
-
getRoot
public RootBindingAwareBroker.RootSalInstance getRoot()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getNotificationBroker
public NotificationProviderService getNotificationBroker()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getNotificationPublishService
public NotificationPublishService getNotificationPublishService()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getRpcProviderRegistry
public RpcProviderRegistry getRpcProviderRegistry()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getRpcBroker
public RpcProviderRegistry getRpcBroker()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getMountService
public MountPointService getMountService()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setDataBroker
public void setDataBroker(DataBroker asyncDataBroker)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setMountService
public void setMountService(MountPointService mount)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setRpcBroker
public void setRpcBroker(RpcProviderRegistry rpcBroker)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setNotificationBroker
public void setNotificationBroker(NotificationProviderService notificationBroker)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setNotificationPublishService
public void setNotificationPublishService(NotificationPublishService notificationPublishService)
Deprecated, for removal: This API element is subject to removal in a future version.
-
start
public void start()
Deprecated, for removal: This API element is subject to removal in a future version.
-
registerConsumer
public BindingAwareBroker.ConsumerContext registerConsumer(BindingAwareConsumer consumer, org.osgi.framework.BundleContext ctx)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
registerConsumer
in interfaceBindingAwareBroker
-
registerConsumer
public BindingAwareBroker.ConsumerContext registerConsumer(BindingAwareConsumer consumer)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BindingAwareBroker
Registers theBindingAwareConsumer
, 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)
.- Specified by:
registerConsumer
in interfaceBindingAwareBroker
- Parameters:
consumer
- Consumer to be registered.- Returns:
- a session specific to consumer registration
-
registerProvider
public BindingAwareBroker.ProviderContext registerProvider(BindingAwareProvider provider, org.osgi.framework.BundleContext ctx)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
registerProvider
in interfaceBindingAwareBroker
-
registerProvider
public BindingAwareBroker.ProviderContext registerProvider(BindingAwareProvider provider)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BindingAwareBroker
Registers theBindingAwareProvider
, 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)
.- Specified by:
registerProvider
in interfaceBindingAwareBroker
- Parameters:
provider
- Provider to be registered.- Returns:
- a session unique to the provider registration.
-
close
public void close()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceAutoCloseable
-
addRoutedRpcImplementation
public <T extends RpcService> BindingAwareBroker.RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation) throws IllegalStateException
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RpcProviderRegistry
Registers an implementation of the given routed RPC service interface.See the
class
documentation for information and example on how to use routed RPCs.- Specified by:
addRoutedRpcImplementation
in interfaceRpcProviderRegistry
- Parameters:
type
- the YANG-generated interface of the RPC Service for which to register.implementation
- the implementation instance to register.- Returns:
- a RoutedRpcRegistration instance which can be used to register paths for the RPC
implementation via invoking RoutedRpcRegistration#registerPath(Class, InstanceIdentifer).
BindingAwareBroker.RpcRegistration.close()
should be called to unregister the implementation and all previously registered paths when no longer needed. - Throws:
IllegalStateException
- if the supplied RPC interface is not a routed RPC type.
-
addRpcImplementation
public <T extends RpcService> BindingAwareBroker.RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation) throws IllegalStateException
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RpcProviderRegistry
Registers a global implementation of the provided RPC service interface. All methods of the interface are required to be implemented.- Specified by:
addRpcImplementation
in interfaceRpcProviderRegistry
- Parameters:
type
- the YANG-generated interface of the RPC Service for which to register.implementation
- "the implementation of the RPC service interface.- Returns:
- an RpcRegistration instance that should be used to unregister the RPC implementation
when no longer needed by calling
BindingAwareBroker.RpcRegistration.close()
. - Throws:
IllegalStateException
- if the supplied RPC interface is a routed RPC type.
-
getRpcService
public <T extends RpcService> T getRpcService(Class<T> module)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:RpcConsumerRegistry
Returns an implementation of a requested RPC service.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:
- If an actual implementation is registered with the MD-SAL, all invocations are forwarded to the registered implementation.
- If no actual implementation is registered, all invocations will fail by
throwing
IllegalStateException
. - Prior to invoking the actual implementation, the method arguments are are validated.
If any are invalid, an
IllegalArgumentException
is thrown.
The returned proxy is automatically updated with the most recent registered implementation.
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 } });
- Specified by:
getRpcService
in interfaceRpcConsumerRegistry
- Parameters:
module
- the interface of the RPC Service. Typically this is an interface generated from a YANG model.- Returns:
- the proxy for the requested RPC service. This method never returns null.
-
registerRouteChangeListener
public <L extends RouteChangeListener<RpcContextIdentifier,InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(L listener)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
registerRouteChangeListener
in interfaceRouteChangePublisher<RpcContextIdentifier,InstanceIdentifier<?>>
-
-