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=453ff449118ffab0898f429cb02c8ec0ca8ed5ff;hb=81bbe76bd26399118d028663d08e464ce6b7d040;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..453ff44911 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,9 @@ */ 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.ObjectRegistration; import org.opendaylight.yangtools.yang.binding.BaseIdentity; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.RpcService; @@ -17,57 +17,54 @@ import org.osgi.framework.BundleContext; /** * Binding-aware core of the SAL layer responsible for wiring the SAL consumers. - * + * * The responsibility of the broker is to maintain registration of SAL * functionality {@link Consumer}s and {@link Provider}s, store provider and * consumer specific context and functionality registration via * {@link ConsumerContext} and provide access to infrastructure services, which * 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. - * - * + * + * *
* 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 * {@link Consumer#onSessionInitiated(ConsumerContext)}. - * + * * @param cons * Consumer to be registered. * @return a session specific to consumer registration @@ -80,24 +77,24 @@ public interface BindingAwareBroker { /** * Registers the {@link BindingAwareProvider}, which will use the SAL layer. - * + * *
* During the registration, the broker obtains the initial functionality * from consumer, using the * {@link 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 * {@link BindingAwareProvider#onSessionInitiated(ProviderContext)}. - * - * + * + * * @param prov * Provider to be registered. * @return a session unique to the provider registration. @@ -110,106 +107,85 @@ public interface BindingAwareBroker { /** * {@link BindingAwareConsumer} specific access to the SAL functionality. - * + * *
* ConsumerSession is {@link BindingAwareConsumer}-specific access to the * SAL functionality and infrastructure services. - * + * *
* The session serves to store SAL context (e.g. registration of
* functionality) for the consumer and provides access to the SAL
* infrastructure services and other functionality provided by
* {@link Provider}s.
- *
- *
- *
*/
- public interface ConsumerContext {
+ public interface ConsumerContext extends RpcConsumerRegistry {
/**
* Returns a session specific instance (implementation) of requested
* binding-aware infrastructural service
- *
+ *
* @param service
* Broker service
* @return Session specific implementation of service
*/
* ProviderSession is {@link BindingAwareProvider}-specific access to the
* SAL functionality and infrastructure services, which also allows for
* exposing the provider's functionality to the other
* {@link BindingAwareConsumer}s.
- *
+ *
*
* The session serves to store SAL context (e.g. registration of
* functionality) for the providers and exposes access to the SAL
* infrastructure services, dynamic functionality registration and any other
* functionality provided by other {@link BindingAwareConsumer}s.
- *
+ *
*/
- public interface ProviderContext extends ConsumerContext {
- /**
- * Registers an global RpcService implementation.
- *
- * @param type
- * @param implementation
- * @return
- */
-