Class AbstractBindingSalConsumerInstance<N extends NotificationService,R extends RpcConsumerRegistry>
- java.lang.Object
-
- org.opendaylight.controller.md.sal.binding.util.AbstractBindingSalConsumerInstance<N,R>
-
- All Implemented Interfaces:
BindingService
,BindingAwareService
,NotificationService
,RpcConsumerRegistry
- Direct Known Subclasses:
AbstractBindingSalProviderInstance
@Deprecated(forRemoval=true) public abstract class AbstractBindingSalConsumerInstance<N extends NotificationService,R extends RpcConsumerRegistry> extends Object implements RpcConsumerRegistry, NotificationService
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBindingSalConsumerInstance(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 protected N
getNotificationBroker()
Deprecated, for removal: This API element is subject to removal in a future version.protected N
getNotificationBrokerChecked()
Deprecated, for removal: This API element is subject to removal in a future version.protected R
getRpcRegistry()
Deprecated, for removal: This API element is subject to removal in a future version.protected R
getRpcRegistryChecked()
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.<T extends Notification>
ListenerRegistration<NotificationListener<T>>registerNotificationListener(Class<T> notificationType, NotificationListener<T> listener)
Deprecated, for removal: This API element is subject to removal in a future version.Registers a generic listener implementation for a specified notification type.ListenerRegistration<NotificationListener>
registerNotificationListener(NotificationListener listener)
Deprecated, for removal: This API element is subject to removal in a future version.Registers a listener which implements a YANG-generated notification interface derived fromNotificationListener
.
-
-
-
Method Detail
-
getRpcRegistry
protected final R getRpcRegistry()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getNotificationBroker
protected final N getNotificationBroker()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getRpcRegistryChecked
protected final R getRpcRegistryChecked()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getNotificationBrokerChecked
protected final N getNotificationBrokerChecked()
Deprecated, for removal: This API element is subject to removal in a future version.
-
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.
-
registerNotificationListener
public <T extends Notification> ListenerRegistration<NotificationListener<T>> registerNotificationListener(Class<T> notificationType, NotificationListener<T> listener)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NotificationService
Registers a generic listener implementation for a specified notification type.- Specified by:
registerNotificationListener
in interfaceNotificationService
- Parameters:
notificationType
- the YANG-generated interface of the notification type.listener
- the listener implementation that will receive notifications.- Returns:
- a
ListenerRegistration
instance that should be used to unregister the listener by invoking theListenerRegistration.close()
method when no longer needed.
-
registerNotificationListener
public ListenerRegistration<NotificationListener> registerNotificationListener(NotificationListener listener)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:NotificationService
Registers a listener which implements a YANG-generated notification interface derived fromNotificationListener
. The listener is registered for all notifications present in the implemented interface.- Specified by:
registerNotificationListener
in interfaceNotificationService
- Parameters:
listener
- the listener implementation that will receive notifications.- Returns:
- a
ListenerRegistration
instance that should be used to unregister the listener by invoking theListenerRegistration.close()
method when no longer needed.
-
-