use of org.jclouds.predicates.SocketOpen in project legacy-jclouds-examples by jclouds.
the class CloudServersPublish method awaitSsh.
private void awaitSsh(String ip) throws TimeoutException {
SocketOpen socketOpen = compute.getContext().utils().injector().getInstance(SocketOpen.class);
Predicate<HostAndPort> socketTester = retry(socketOpen, 300, 5, 5, SECONDS);
socketTester.apply(HostAndPort.fromParts(ip, 22));
}
Aggregations