Class AbstractBindingSalProviderInstance<N extends NotificationProviderService,R extends RpcProviderRegistry>
- java.lang.Object
-
- org.opendaylight.controller.md.sal.binding.util.AbstractBindingSalConsumerInstance<N,R>
-
- org.opendaylight.controller.md.sal.binding.util.AbstractBindingSalProviderInstance<N,R>
-
- All Implemented Interfaces:
BindingService
,NotificationPublishService<Notification>
,RouteChangePublisher<RpcContextIdentifier,InstanceIdentifier<?>>
,BindingAwareService
,NotificationProviderService
,NotificationService
,RpcConsumerRegistry
,RpcProviderRegistry
- Direct Known Subclasses:
RootBindingAwareBroker.RootSalInstance
@Deprecated(forRemoval=true) public abstract class AbstractBindingSalProviderInstance<N extends NotificationProviderService,R extends RpcProviderRegistry> extends AbstractBindingSalConsumerInstance<N,R> implements RpcProviderRegistry, NotificationProviderService
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.controller.sal.binding.api.NotificationProviderService
NotificationProviderService.NotificationInterestListener
-
-
Constructor Summary
Constructors Constructor Description AbstractBindingSalProviderInstance(R rpcRegistry, N notificationBroker)
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
publish(Notification notification)
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification and notifies subscribed listeners.void
publish(Notification notification, ExecutorService service)
Deprecated, for removal: This API element is subject to removal in a future version.Publishes a notification and notifies subscribed listeners.ListenerRegistration<NotificationProviderService.NotificationInterestListener>
registerInterestListener(NotificationProviderService.NotificationInterestListener interestListener)
Deprecated, for removal: This API element is subject to removal in a future version.Registers a listener to be notified about notification subscriptions.<L extends RouteChangeListener<RpcContextIdentifier,InstanceIdentifier<?>>>
ListenerRegistration<L>registerRouteChangeListener(L listener)
Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class org.opendaylight.controller.md.sal.binding.util.AbstractBindingSalConsumerInstance
getNotificationBroker, getNotificationBrokerChecked, getRpcRegistry, getRpcRegistryChecked, getRpcService, registerNotificationListener, registerNotificationListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.controller.sal.binding.api.NotificationService
registerNotificationListener, registerNotificationListener
-
Methods inherited from interface org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry
getRpcService
-
-
-
-
Method Detail
-
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.
-
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.
-
publish
public void publish(Notification notification)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NotificationPublishService
Publishes a notification and notifies subscribed listeners. All listener notifications are done via a default executor.Note: This call will block when the default executor is saturated and the notification queue for this executor is full.
- Specified by:
publish
in interfaceNotificationProviderService
- Specified by:
publish
in interfaceNotificationPublishService<N extends NotificationProviderService>
- Parameters:
notification
- the notification to publish.
-
publish
public void publish(Notification notification, ExecutorService service)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NotificationPublishService
Publishes a notification and notifies subscribed listeners. All listener notifications are done via the provided executor.Note: Use only if necessary. Consider using
NotificationPublishService.publish(Object)
for most use-cases.By using this method you could customize execution policy of listeners present inside process (e.g. using single-threaded executor or even same-thread executor delivery.
This executor is used only for inside-process notification deliveries.
- Specified by:
publish
in interfaceNotificationProviderService
- Specified by:
publish
in interfaceNotificationPublishService<N extends NotificationProviderService>
- Parameters:
notification
- the notification to publish.service
- the executor that will be used to deliver notifications to subscribed listeners.
-
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<N extends NotificationProviderService,R extends RpcProviderRegistry>
-
registerInterestListener
public ListenerRegistration<NotificationProviderService.NotificationInterestListener> registerInterestListener(NotificationProviderService.NotificationInterestListener interestListener)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NotificationProviderService
Registers a listener to be notified about notification subscriptions. This enables a component to know when there is a notification listener subscribed for a particular notification type.On registration of this listener, the
NotificationProviderService.NotificationInterestListener.onNotificationSubscribtion(Class)
method will be invoked for every notification type that currently has a notification listener subscribed.- Specified by:
registerInterestListener
in interfaceNotificationProviderService
- Parameters:
interestListener
- the listener that will be notified when subscriptions for new notification types occur.- Returns:
- a
ListenerRegistration
instance that should be used to unregister the listener by invoking theListenerRegistration.close()
method when no longer needed.
-
-