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.sal.connect.api;
10 import org.opendaylight.mdsal.dom.api.DOMActionService;
11 import org.opendaylight.mdsal.dom.api.DOMNotification;
12 import org.opendaylight.mdsal.dom.api.DOMRpcService;
13 import org.opendaylight.netconf.sal.connect.netconf.listener.NetconfSessionPreferences;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
15 import org.opendaylight.yangtools.rfc8528.data.api.MountPointContext;
17 public interface RemoteDeviceHandler extends AutoCloseable {
19 * When device connected, init new mount point with specific schema context and DOM services.
21 * @param remoteSchemaContext - schema context of connected device
22 * @param sessionPreferences - session of device
23 * @param deviceRpc - {@link DOMRpcService} of device
25 default void onDeviceConnected(final MountPointContext remoteSchemaContext,
26 final NetconfSessionPreferences sessionPreferences, final DOMRpcService deviceRpc) {
31 * When device connected, init new mount point with specific schema context and DOM services.
33 * @param mountContext - MountPointContext of connected device
34 * @param sessionPreferences - session of device
35 * @param deviceRpc - {@link DOMRpcService} of device
36 * @param deviceAction - {@link DOMActionService} of device
38 default void onDeviceConnected(final MountPointContext mountContext,
39 final NetconfSessionPreferences sessionPreferences,
40 final DOMRpcService deviceRpc, final DOMActionService deviceAction) {
44 default void onDeviceReconnected(final NetconfSessionPreferences sessionPreferences, final NetconfNode node) {
48 // FIXME: document this node
49 void onDeviceDisconnected();
51 // FIXME: document this node
52 void onDeviceFailed(Throwable throwable);
54 // FIXME: document this node
55 void onNotification(DOMNotification domNotification);