2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netconf.client.mdsal.spi;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.mdsal.dom.api.DOMRpcResult;
12 import org.opendaylight.mdsal.dom.api.DOMRpcService;
13 import org.opendaylight.netconf.client.mdsal.api.RemoteDeviceCommunicator;
14 import org.opendaylight.netconf.client.mdsal.api.RemoteDeviceServices.Rpcs;
15 import org.opendaylight.netconf.client.mdsal.api.RpcTransformer;
16 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
17 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
20 * Invokes RPC by sending netconf message via listener. Also transforms result from NetconfMessage to
21 * {@link ContainerNode}.
23 public final class NetconfDeviceRpc implements Rpcs.Normalized {
24 private final @NonNull NetconfDeviceDOMRpcService domRpcService;
26 public NetconfDeviceRpc(final EffectiveModelContext modelContext, final RemoteDeviceCommunicator communicator,
27 final RpcTransformer<ContainerNode, DOMRpcResult> transformer) {
28 domRpcService = new NetconfDeviceDOMRpcService(modelContext, communicator, transformer);
32 public DOMRpcService domRpcService() {