Bug 8095: Add operational devices to call home collection.
[netconf.git] / netconf / callhome-provider / src / main / java / org / opendaylight / netconf / callhome / mount / ContextKey.java
index cb0578fe3b31a8899b7d939eb551030ea55a9e32..6fe0c29894f2c3fa804a1daf4fe1bedc17d62ccf 100644 (file)
@@ -25,7 +25,7 @@ class ContextKey {
     private final IpAddress address;
     private final PortNumber port;
 
-    public ContextKey(IpAddress address, PortNumber port) {
+    ContextKey(IpAddress address, PortNumber port) {
         this.address = Preconditions.checkNotNull(address);
         this.port = Preconditions.checkNotNull(port);
     }
@@ -50,10 +50,6 @@ class ContextKey {
         return Objects.equal(address, other.address) && Objects.equal(port, other.port);
     }
 
-    public static ContextKey from(NetconfNode node) {
-        return new ContextKey(node.getHost().getIpAddress(), node.getPort());
-    }
-
     IpAddress getIpAddress() {
         return address;
     }
@@ -62,6 +58,10 @@ class ContextKey {
         return port;
     }
 
+    public static ContextKey from(NetconfNode node) {
+        return new ContextKey(node.getHost().getIpAddress(), node.getPort());
+    }
+
     public static ContextKey from(SocketAddress remoteAddress) {
         Preconditions.checkArgument(remoteAddress instanceof InetSocketAddress);
         InetSocketAddress inetSocketAddr = (InetSocketAddress) remoteAddress;
@@ -84,4 +84,4 @@ class ContextKey {
         }
         return address.getIpv6Address().getValue() + ":" + port.getValue();
     }
-}
\ No newline at end of file
+}