*/
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.
*
* {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)} and
* {@link RpcImplementation}
* <li>Notification Service - see {@link NotificationService} and
- * {@link NotificationProviderService}
+ * {@link NotificationPublishService}
* <li>Functionality and Data model
* <li>Data Store access and modification - see {@link DataBrokerService} and
* {@link DataProviderService}
*
* @param cons
* Consumer to be registered.
- * @param context
+ * @param context
* @return a session specific to consumer registration
* @throws IllegalArgumentException
* If the consumer is <code>null</code>.
*
* @param prov
* Provider to be registered.
- * @param context
+ * @param context
* @return a session unique to the provider registration.
* @throws IllegalArgumentException
* If the provider is <code>null</code>.
* infrastructure services and other functionality provided by
* {@link Provider}s.
*
-
+ *
*
*/
public interface ConsumerSession {
* @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.
@Override
boolean isClosed();
+
+ Set<QName> getSupportedRpcs();
+
+ ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(RpcRegistrationListener listener);
+ }
+
+ public interface RpcRegistration extends Registration<RpcImplementation> {
+ QName getType();
+ }
+
+ public interface RoutedRpcRegistration extends RpcRegistration,
+ RoutedRegistration<QName, InstanceIdentifier, RpcImplementation> {
}
}