*/
package org.opendaylight.controller.md.sal.dom.broker.impl;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import com.google.common.util.concurrent.CheckedFuture;
import java.util.List;
import java.util.Map;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
+@Deprecated
final class GlobalDOMRpcRoutingTableEntry extends AbstractDOMRpcRoutingTableEntry {
private final DOMRpcIdentifier rpcId;
- private GlobalDOMRpcRoutingTableEntry(final DOMRpcIdentifier rpcId, final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
+ private GlobalDOMRpcRoutingTableEntry(final DOMRpcIdentifier rpcId,
+ final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
super(rpcId.getType(), impls);
- this.rpcId = Preconditions.checkNotNull(rpcId);
+ this.rpcId = requireNonNull(rpcId);
}
// We do not need the RpcDefinition, but this makes sure we do not
// forward something we don't know to be an RPC.
- GlobalDOMRpcRoutingTableEntry(final RpcDefinition def, final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
+ GlobalDOMRpcRoutingTableEntry(final RpcDefinition def,
+ final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
super(def.getPath(), impls);
this.rpcId = DOMRpcIdentifier.create(def.getPath());
}
@Override
protected CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(final NormalizedNode<?, ?> input) {
- return getImplementations(null).get(0).invokeRpc(rpcId, input);
+ return getImplementations(YangInstanceIdentifier.empty()).get(0).invokeRpc(rpcId, input);
}
@Override
- protected GlobalDOMRpcRoutingTableEntry newInstance(final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
+ protected GlobalDOMRpcRoutingTableEntry newInstance(
+ final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls) {
return new GlobalDOMRpcRoutingTableEntry(rpcId, impls);
}
-}
\ No newline at end of file
+}