/* * Copyright (c) 2018 Pantheon Technologies, s.r.o. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.mdsal.dom.api; import com.google.common.annotations.Beta; import java.util.EventListener; import java.util.Set; import org.eclipse.jdt.annotation.NonNullByDefault; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute; /** * 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 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 * and will be kept uptodate as implementations come and go. * *
* Users should note that using a listener does not necessarily mean that * {@link DOMActionService#invokeAction(Absolute, DOMDataTreeIdentifier, ContainerNode)} will not report * a failure due to {@link DOMActionNotAvailableException} and need to be ready to handle it. * *
* Implementations are encouraged to take reasonable precautions to prevent this scenario from occurring.
*
* @param listener {@link AvailabilityListener} instance to register
* @return A {@link ListenerRegistration} representing this registration. Performing a
* {@link ListenerRegistration#close()} will cancel it.
* @throws NullPointerException if {@code listener} is null
*/
* Set<DOMActionInstancelt;?>> operations;
* operations.removeAll(removed);
* operations.addAll(added);
*
*
* @param removed operations which disappeared
* @param added operations which became available
*/
void onActionsChanged(Set