import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
/**
- * An {@link DOMOperationServiceExtension} exposed by {@link DOMOperationService}s which allow their users to listen
- * for operations becoming available.
+ * An {@link DOMActionServiceExtension} exposed by {@link DOMActionService}s which allow their users to listen
+ * for actions are becoming available.
*
* @author Robert Varga
*/
@Beta
@NonNullByDefault
-public interface DOMOperationAvailabilityExtension extends DOMOperationServiceExtension {
+public interface DOMActionAvailabilityExtension extends DOMActionServiceExtension {
/**
* Register a {@link AvailabilityListener} with this service to receive notifications about operation
* implementations becoming (un)available. The listener will be invoked with the current implementations reported
*
* <p>
* Users should note that using a listener does not necessarily mean that
- * {@link DOMOperationService#invokeRpc(QName, ContainerNode)} and
- * {@link DOMOperationService#invokeAction(SchemaPath, DOMDataTreeIdentifier, ContainerNode)} will not report
- * a failure due to {@link DOMOperationNotAvailableException} and need to be ready to handle it.
+ * {@link DOMActionService#invokeAction(SchemaPath, DOMDataTreeIdentifier, ContainerNode)} will not report
+ * a failure due to {@link DOMActionNotAvailableException} and need to be ready to handle it.
*
* <p>
* Implementations are encouraged to take reasonable precautions to prevent this scenario from occurring.
/**
* An {@link EventListener} used to track Operation implementations becoming (un)available
- * to a {@link DOMOperationService}.
+ * to a {@link DOMActionService}.
*/
interface AvailabilityListener extends EventListener {
/**
- * Method invoked whenever an operation type becomes available or unavailable. There are two sets reported,
+ * Method invoked whenever an action type becomes available or unavailable. There are two sets reported,
* removed and added. To reconstruct the state, first apply removed and then added operations, like this:
*
* <code>
- * Set<AvailableOperation<?>> operations;
+ * Set<DOMActionInstancelt;?>> operations;
* operations.removeAll(removed);
* operations.addAll(added);
* </code>
* @param removed operations which disappeared
* @param added operations which became available
*/
- void onOperationsChanged(Set<DOMOperationInstance<?>> removed, Set<DOMOperationInstance<?>> added);
+ void onActionsChanged(Set<DOMActionInstance> removed, Set<DOMActionService> added);
/**
* Implementation filtering method. This method is useful for forwarding operation implementations,
* @param impl Operation implementation being registered
* @return False if the implementation should not be reported, defaults to true.
*/
- default boolean acceptsImplementation(final DOMOperationImplementation impl) {
+ default boolean acceptsImplementation(final DOMActionImplementation impl) {
return true;
}
}