X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2FBindingAwareBroker.java;h=db0d674e63df81febc8de6b7a0eacbbd6f308cb7;hb=bdd4a423714b345e24d7e1488da17a1f71462577;hp=14db6e5a32d213142e28768a314693a6cfd9ac48;hpb=526185d061ed50c75890b31a376e9495144b660a;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java index 14db6e5a32..db0d674e63 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java @@ -7,9 +7,11 @@ */ package org.opendaylight.controller.sal.binding.api; +import org.opendaylight.controller.md.sal.common.api.routing.RoutedRegistration; import org.opendaylight.controller.sal.binding.api.BindingAwareProvider.ProviderFunctionality; import org.opendaylight.controller.sal.binding.api.data.DataBrokerService; import org.opendaylight.controller.sal.binding.api.data.DataProviderService; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.BaseIdentity; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.RpcService; @@ -25,7 +27,7 @@ import org.osgi.framework.BundleContext; * removes direct dependencies between providers and consumers. * * The Binding-aware broker is also responsible for translation from Java - * classes modeling the functionality and data to binding-indpenedent form which + * classes modeling the functionality and data to binding-independent form which * is used in SAL Core. * * @@ -124,7 +126,7 @@ public interface BindingAwareBroker { * * */ - public interface ConsumerContext { + public interface ConsumerContext extends RpcConsumerRegistry { /** * Returns a session specific instance (implementation) of requested @@ -136,15 +138,7 @@ public interface BindingAwareBroker { */ T getSALService(Class service); - /** - * Returns a session specific instance (implementation) of requested - * YANG module implentation / service provided by consumer. - * - * @param service - * Broker service - * @return Session specific implementation of service - */ - T getRpcService(Class module); + } /** @@ -163,53 +157,45 @@ public interface BindingAwareBroker { * functionality provided by other {@link BindingAwareConsumer}s. * */ - public interface ProviderContext extends ConsumerContext { - /** - * Registers an global RpcService implementation. - * - * @param type - * @param implementation - * @return - */ - RpcRegistration addRpcImplementation(Class type, T implementation) - throws IllegalStateException; + public interface ProviderContext extends ConsumerContext, RpcProviderRegistry { - RpcRegistration addMountRpcImplementation(Class type, - InstanceIdentifier mount, T implementation) throws IllegalStateException; - - RoutedRpcRegistration addRoutedRpcImplementation(Class type, T implementation) - throws IllegalStateException; - + @Deprecated void registerFunctionality(ProviderFunctionality functionality); + + @Deprecated void unregisterFunctionality(ProviderFunctionality functionality); } - public interface RpcRegistration { - - /** - * - * @return instance for which registration does exists. - */ - T getService(); + public interface RpcRegistration extends Registration { - /** - * Unregister an RpcService from broker. - * - */ - void unregister(); + Class getServiceType(); } - public interface RoutedRpcRegistration extends RpcRegistration { + public interface RoutedRpcRegistration extends RpcRegistration, + RoutedRegistration, InstanceIdentifier, T> { /** * Register particular instance identifier to be processed by this * RpcService * + * Deprecated in favor of {@link RoutedRegistration#registerPath(Object, Object)}. + * * @param context * @param instance */ - void registerInstance(Class context, InstanceIdentifier instance); + @Deprecated + void registerInstance(Class context, InstanceIdentifier instance); - void unregisterInstance(Class context, InstanceIdentifier instance); + /** + * Unregister particular instance identifier to be processed by this + * RpcService + * + * Deprecated in favor of {@link RoutedRegistration#unregisterPath(Object, Object)}. + * + * @param context + * @param instance + */ + @Deprecated + void unregisterInstance(Class context, InstanceIdentifier instance); } }