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=01f78cd5aab6bd006acacd29496234edde526508;hp=724cbe75f420e41ccfcfbe041f4b2854e2e1d616;hb=e9b227f251a0fffe9b0365903f2045268c48b7dd;hpb=81bbe76bd26399118d028663d08e464ce6b7d040 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 724cbe75f4..01f78cd5aa 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,16 +7,6 @@ */ 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.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.concepts.ObjectRegistration; -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; /** @@ -29,19 +19,6 @@ import org.osgi.framework.BundleContext; * removes direct dependencies between providers and consumers. * * - *
null
.
* @throws IllegalStateException
* If the consumer is already registered.
*/
+ ConsumerSession registerConsumer(Consumer cons);
+
+ /*
+ * @deprecated Use registerConsumer(Consumer cons) instead (BundleContext is no longer used)
+ */
+ @Deprecated
ConsumerSession registerConsumer(Consumer cons, BundleContext context);
/**
@@ -95,12 +77,6 @@ public interface Broker {
* from consumer, using the {@link Provider#getProviderFunctionality()}, and
* register that functionality into system and concrete infrastructure
* services.
- *
- * - * Note that consumer could register additional functionality at later point - * by using service and functionality specific APIs (e.g. - * {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)} - * *
* The consumer is required to use returned session for all
* communication with broker or one of the broker services. The session is
@@ -110,13 +86,18 @@ public interface Broker {
*
* @param prov
* Provider to be registered.
- * @param context
* @return a session unique to the provider registration.
* @throws IllegalArgumentException
* If the provider is
- * The registered rpc functionality will be available to all other
- * consumers and providers registered to the broker, which are aware of
- * the {@link QName} assigned to the rpc.
- *
- *
- * There is no assumption that rpc type is in the set returned by
- * invoking {@link RpcImplementation#getSupportedRpcs()}. This allows
- * for dynamic rpc implementations.
- *
- * @param rpcType
- * Name of Rpc
- * @param implementation
- * Provider's Implementation of the RPC functionality
- * @throws IllegalArgumentException
- * If the name of RPC is invalid
- */
- RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
- throws IllegalArgumentException;
-
- RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation);
-
- RoutedRpcRegistration addMountedRpcImplementation(QName rpcType, RpcImplementation implementation);
-
+ interface ProviderSession extends ConsumerSession {
/**
* Closes a session between provider and SAL.
*
@@ -227,19 +169,5 @@ public interface Broker {
@Override
boolean isClosed();
-
- Setnull
.
* @throws IllegalStateException
* If the consumer is already registered.
*/
+ ProviderSession registerProvider(Provider prov);
+
+ /*
+ * @deprecated Use registerProvider(Provider cons) instead (BundleContext is no longer used)
+ */
+ @Deprecated
ProviderSession registerProvider(Provider prov, BundleContext context);
/**
@@ -135,19 +116,7 @@ public interface Broker {
*
*
*/
- public interface ConsumerSession {
-
- /**
- * Sends an RPC to other components registered to the broker.
- *
- * @see RpcImplementation
- * @param rpc
- * Name of RPC
- * @param input
- * Input data to the RPC
- * @return Result of the RPC call
- */
- Future