X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2Fapi%2FBroker.java;h=f7c46086e301ac9309bb435921388b97a39cd4a2;hp=b2c35507837dab1dde9ed73e5f9b635161613d98;hb=9f6f0ac9246e8161a7d35275042a255398c68eca;hpb=6b64494fd8e4654a298312afb4b8e6e827b75d5d diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java index b2c3550783..f7c46086e3 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/Broker.java @@ -7,18 +7,22 @@ */ package org.opendaylight.controller.sal.core.api; +import java.util.Set; import java.util.concurrent.Future; +import org.opendaylight.controller.md.sal.common.api.routing.RoutedRegistration; import org.opendaylight.controller.sal.core.api.data.DataBrokerService; import org.opendaylight.controller.sal.core.api.data.DataProviderService; -import org.opendaylight.controller.sal.core.api.notify.NotificationProviderService; +import org.opendaylight.controller.sal.core.api.notify.NotificationPublishService; import org.opendaylight.controller.sal.core.api.notify.NotificationService; +import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; import org.osgi.framework.BundleContext; - /** * Core component of the SAL layer responsible for wiring the SAL consumers. * @@ -36,7 +40,7 @@ import org.osgi.framework.BundleContext; * {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)} and * {@link RpcImplementation} *
  • Notification Service - see {@link NotificationService} and - * {@link NotificationProviderService} + * {@link NotificationPublishService} *
  • Functionality and Data model *
  • Data Store access and modification - see {@link DataBrokerService} and * {@link DataProviderService} @@ -78,7 +82,7 @@ public interface Broker { * * @param cons * Consumer to be registered. - * @param context + * @param context * @return a session specific to consumer registration * @throws IllegalArgumentException * If the consumer is null. @@ -110,7 +114,7 @@ public interface Broker { * * @param prov * Provider to be registered. - * @param context + * @param context * @return a session unique to the provider registration. * @throws IllegalArgumentException * If the provider is null. @@ -132,7 +136,7 @@ public interface Broker { * infrastructure services and other functionality provided by * {@link Provider}s. * - + * * */ public interface ConsumerSession { @@ -208,22 +212,12 @@ public interface Broker { * @throws IllegalArgumentException * If the name of RPC is invalid */ - void addRpcImplementation(QName rpcType, - RpcImplementation implementation) + RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation) throws IllegalArgumentException; - /** - * Unregisters an Rpc implementation - * - * @param rpcType - * Name of Rpc - * @param implementation - * Registered Implementation of the Rpc functionality - * @throws IllegalArgumentException - */ - void removeRpcImplementation(QName rpcType, - RpcImplementation implementation) - throws IllegalArgumentException; + RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation); + + RoutedRpcRegistration addMountedRpcImplementation(QName rpcType, RpcImplementation implementation); /** * Closes a session between provider and SAL. @@ -237,5 +231,17 @@ public interface Broker { @Override boolean isClosed(); + + Set getSupportedRpcs(); + + ListenerRegistration addRpcRegistrationListener(RpcRegistrationListener listener); + } + + public interface RpcRegistration extends Registration { + QName getType(); + } + + public interface RoutedRpcRegistration extends RpcRegistration, + RoutedRegistration { } }