package org.opendaylight.yangtools.yang.binding;
import com.google.common.annotations.Beta;
-import com.google.common.util.concurrent.FluentFuture;
-import javax.annotation.CheckReturnValue;
-import org.eclipse.jdt.annotation.NonNullByDefault;
+import com.google.common.util.concurrent.ListenableFuture;
+import edu.umd.cs.findbugs.annotations.CheckReturnValue;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.RpcResult;
/**
*/
@Beta
@FunctionalInterface
-@NonNullByDefault
-public interface Action<P extends DataObject, I extends RpcInput, O extends RpcOutput> {
+public interface Action<P extends InstanceIdentifier<?>, I extends RpcInput, O extends RpcOutput> {
/**
* Invoke the action.
*
* @param input Input argument
* @return Future result of invocation
* @throws NullPointerException if any of the arguments are null
+ * @throws IllegalArgumentException if {@code path} is {@link InstanceIdentifier#isWildcarded()}
*/
@CheckReturnValue
- FluentFuture<RpcResult<O>> invoke(InstanceIdentifier<P> path, I input);
+ @NonNull ListenableFuture<@NonNull RpcResult<@NonNull O>> invoke(@NonNull P path, @NonNull I input);
}