2  * ============LICENSE_START========================================================================
 
   3  * ONAP : ccsdk feature sdnr wt
 
   4  * =================================================================================================
 
   5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
 
   6  * =================================================================================================
 
   7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 
   8  * in compliance with the License. You may obtain a copy of the License at
 
  10  * http://www.apache.org/licenses/LICENSE-2.0
 
  12  * Unless required by applicable law or agreed to in writing, software distributed under the License
 
  13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 
  14  * or implied. See the License for the specific language governing permissions and limitations under
 
  16  * ============LICENSE_END==========================================================================
 
  19 package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice;
 
  21 import java.util.EventListener;
 
  22 import java.util.Optional;
 
  23 import org.eclipse.jdt.annotation.NonNull;
 
  24 import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
 
  25 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 
  28  * Indicate if device is connected or not. A NetconfNode (Mountpoint) is providing the status. If this is Master and
 
  29  * connected, this function is calles.
 
  32 public interface NetconfNodeConnectListener extends EventListener, AutoCloseable {
 
  35      * Called if device state changes to "connected" for a netconf master node.
 
  37      * @param acessor containing <br>
 
  38      *        - nNodeId name of mount point<br>
 
  39      *        - netconfNode with related information<br>
 
  40      *        - mountPoint of the node<br>
 
  41      *        -netconfNodeDataBroker to access connected netconf device
 
  43     public void onEnterConnected(@NonNull NetconfAccessor acessor);
 
  46      * Notify of device state change to "not connected" mount point supervision for master mountpoint HINT: This
 
  47      * callback could be called multiple times also the onEnterConnected state was not called.
 
  49      * @param nNodeId name of mount point
 
  50      * @param optionalNetconfNode with new status or if removed not present
 
  52     public void onLeaveConnected(@NonNull NodeId nNodeId, @NonNull Optional<NetconfNode> optionalNetconfNode);