*/
package org.opendaylight.yangtools.yang.binding.util;
+import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
+import com.google.common.util.concurrent.ListenableFuture;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.Map.Entry;
-import java.util.concurrent.Future;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opendaylight.yangtools.yang.binding.DataObject;
abstract class AbstractMappedRpcInvoker<T> extends RpcServiceInvoker {
private static final Logger LOG = LoggerFactory.getLogger(AbstractMappedRpcInvoker.class);
- private final Map<T, RpcMethodInvoker> map;
+
+ @VisibleForTesting
+ final Map<T, RpcMethodInvoker> map;
protected AbstractMappedRpcInvoker(final Map<T, Method> map) {
final Builder<T, RpcMethodInvoker> b = ImmutableMap.builder();
protected abstract T qnameToKey(QName qname);
@Override
- public final Future<RpcResult<?>> invokeRpc(@Nonnull final RpcService impl, @Nonnull final QName rpcName,
+ public final ListenableFuture<RpcResult<?>> invokeRpc(@Nonnull final RpcService impl, @Nonnull final QName rpcName,
@Nullable final DataObject input) {
Preconditions.checkNotNull(impl, "Implementation must be supplied");