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);
}
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;
}
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;
}
return address.getIpv6Address().getValue() + ":" + port.getValue();
}
-}
\ No newline at end of file
+}