2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.topology.spi;
10 import java.util.List;
11 import org.opendaylight.netconf.client.NetconfClientSessionListener;
12 import org.opendaylight.netconf.sal.connect.api.RemoteDeviceHandler;
13 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfDeviceCommunicator;
14 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceRegistration;
16 public final class NetconfConnectorDTO implements AutoCloseable {
17 private final List<SchemaSourceRegistration<?>> yanglibRegistrations;
18 private final NetconfDeviceCommunicator communicator;
19 private final RemoteDeviceHandler facade;
21 public NetconfConnectorDTO(final NetconfDeviceCommunicator communicator, final RemoteDeviceHandler facade,
22 final List<SchemaSourceRegistration<?>> yanglibRegistrations) {
23 this.communicator = communicator;
25 this.yanglibRegistrations = yanglibRegistrations;
28 public NetconfDeviceCommunicator getCommunicator() {
32 public RemoteDeviceHandler getFacade() {
36 public NetconfClientSessionListener getSessionListener() {
44 yanglibRegistrations.forEach(SchemaSourceRegistration::close);