2 * Copyright (c) 2016 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.test.tool.rpchandler;
11 import org.opendaylight.netconf.api.capability.Capability;
12 import org.opendaylight.netconf.server.api.monitoring.CapabilityListener;
13 import org.opendaylight.netconf.server.api.operations.NetconfOperation;
14 import org.opendaylight.netconf.server.api.operations.NetconfOperationService;
15 import org.opendaylight.netconf.server.api.operations.NetconfOperationServiceFactory;
16 import org.opendaylight.yangtools.concepts.Registration;
18 public class SettableOperationRpcProvider implements NetconfOperationServiceFactory {
19 private final RpcHandler rpcHandler;
21 public SettableOperationRpcProvider(final RpcHandler rpcHandler) {
22 this.rpcHandler = rpcHandler;
26 public Set<Capability> getCapabilities() {
31 public Registration registerCapabilityListener(final CapabilityListener listener) {
36 public NetconfOperationService createService(final String netconfSessionIdForReporting) {
37 return new SettableOperationService(rpcHandler);
40 private static class SettableOperationService implements NetconfOperationService {
41 private final SettableRpc rpc;
43 SettableOperationService(final RpcHandler rpcHandler) {
44 rpc = new SettableRpc(rpcHandler);
48 public Set<NetconfOperation> getNetconfOperations() {