Move internal classes under .impl package (1/2)

Change-Id: I72ed933ecd5ae7ffb268967f80fb395e90f7d8e9
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfDeviceOutputEventListenerImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfDeviceOutputEventListenerImpl.java
index 63a95ba..a68b1c7 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfDeviceOutputEventListenerImpl.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfDeviceOutputEventListenerImpl.java
@@ -16,6 +16,7 @@
 
 package org.onosproject.netconf.ctl;
 
+import org.onosproject.netconf.FilteringNetconfDeviceOutputEventListener;
 import org.onosproject.netconf.NetconfDeviceInfo;
 import org.onosproject.netconf.NetconfDeviceOutputEvent;
 import org.onosproject.netconf.NetconfDeviceOutputEventListener;
@@ -25,7 +26,10 @@
 /**
  * Example of a listener for events that happen a Netconf session established
  * for a particular NETCONF device.
+ *
+ * @deprecated in 1.10.0 use {@link FilteringNetconfDeviceOutputEventListener}
  */
+@Deprecated
 public class NetconfDeviceOutputEventListenerImpl implements NetconfDeviceOutputEventListener {
 
     private static final Logger log =
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/DefaultNetconfDevice.java
similarity index 96%
rename from protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java
rename to protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/DefaultNetconfDevice.java
index 27c2654..c29b895 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/DefaultNetconfDevice.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/DefaultNetconfDevice.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.netconf.ctl;
+package org.onosproject.netconf.ctl.impl;
 
 import org.onosproject.netconf.NetconfDevice;
 import org.onosproject.netconf.NetconfDeviceInfo;
@@ -39,6 +39,7 @@
     protected NetconfSessionFactory sessionFactory = new SshNetconfSessionFactory();
     private NetconfSession netconfSession;
 
+    // will block until hello RPC handshake completes
     /**
      * Creates a new default NETCONF device with the information provided.
      * The device gets created only if no exception is thrown while connecting to
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfControllerImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java
similarity index 99%
rename from protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfControllerImpl.java
rename to protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java
index 59ed7d4..9b4d7fc 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfControllerImpl.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfControllerImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.netconf.ctl;
+package org.onosproject.netconf.ctl.impl;
 
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionDelegate.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionDelegate.java
similarity index 95%
rename from protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionDelegate.java
rename to protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionDelegate.java
index 2204184..fd492f3 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionDelegate.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionDelegate.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.netconf.ctl;
+package org.onosproject.netconf.ctl.impl;
 
 import org.onosproject.netconf.NetconfDeviceOutputEvent;
 
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionImpl.java
similarity index 98%
rename from protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java
rename to protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionImpl.java
index 457bcf2..fc8ac3e 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfSessionImpl.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.netconf.ctl;
+package org.onosproject.netconf.ctl.impl;
 
 import com.google.common.annotations.Beta;
 import ch.ethz.ssh2.Connection;
@@ -22,6 +22,7 @@
 import ch.ethz.ssh2.channel.Channel;
 import com.google.common.base.Preconditions;
 import org.onosproject.netconf.TargetConfig;
+import org.onosproject.netconf.FilteringNetconfDeviceOutputEventListener;
 import org.onosproject.netconf.NetconfDeviceInfo;
 import org.onosproject.netconf.NetconfDeviceOutputEvent;
 import org.onosproject.netconf.NetconfDeviceOutputEventListener;
@@ -180,7 +181,7 @@
                                                     sshSession.getStderr(), deviceInfo,
                                                     new NetconfSessionDelegateImpl(),
                                                     replies);
-            this.addDeviceOutputListener(new NetconfDeviceOutputEventListenerImpl(deviceInfo));
+            this.addDeviceOutputListener(new FilteringNetconfDeviceOutputEventListener(deviceInfo));
             sendHello();
         } catch (IOException e) {
             log.error("Failed to create ch.ethz.ssh2.Session session {} ", e.getMessage());
@@ -284,6 +285,7 @@
 
     }
 
+    @Override
     public void checkAndReestablish() throws NetconfException {
         if (sshSession.getState() != Channel.STATE_OPEN) {
             try {
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamHandler.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfStreamHandler.java
similarity index 98%
rename from protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamHandler.java
rename to protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfStreamHandler.java
index 98ebf3f..ac959e8 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamHandler.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfStreamHandler.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.netconf.ctl;
+package org.onosproject.netconf.ctl.impl;
 
 import com.google.common.annotations.Beta;
 import org.onosproject.netconf.NetconfDeviceOutputEventListener;
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfStreamThread.java
similarity index 99%
rename from protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java
rename to protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfStreamThread.java
index e78f9fa..212a4e6 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/NetconfStreamThread.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfStreamThread.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.netconf.ctl;
+package org.onosproject.netconf.ctl.impl;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/package-info.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/package-info.java
new file mode 100644
index 0000000..2cf6838
--- /dev/null
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * NETCONF controller implementations.
+ */
+package org.onosproject.netconf.ctl.impl;
diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/package-info.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/package-info.java
index cd80952..f5ba5f4 100644
--- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/package-info.java
+++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/package-info.java
@@ -17,4 +17,5 @@
 /**
  * NETCONF controller implementations.
  */
+@java.lang.Deprecated
 package org.onosproject.netconf.ctl;