org.jclouds.compute.util
Interface OpenSocketFinder
- All Known Implementing Classes:
- ConcurrentOpenSocketFinder
public interface OpenSocketFinder
For finding an open/reachable ip:port for a node.
findOpenSocketOnNode
com.google.common.net.HostAndPort findOpenSocketOnNode(NodeMetadata node,
int port,
long timeoutValue,
TimeUnit timeUnits)
- Parameters:
node - The node (checking its public and private addresses)port - The port to try to connect totimeoutValue - Max time to try to connect to the ip:porttimeUnits -
- Returns:
- The reachable ip:port
- Throws:
NoSuchElementException - If no ports accessible within the given time
IllegalStateException - If the given node has no public or private addresses
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.