Search in sources :

Example 1 with SocketOpen

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));
}
Also used : SocketOpen(org.jclouds.predicates.SocketOpen) HostAndPort(com.google.common.net.HostAndPort)

Aggregations

HostAndPort (com.google.common.net.HostAndPort)1 SocketOpen (org.jclouds.predicates.SocketOpen)1