public class HostAndPortChecker extends Object
Modifier and Type | Method and Description |
---|---|
void |
bySshWithEveryRetryWaitFor(int time,
TimeUnit units)
Connects to sshd on host:port
Retries while attempts reached with delay
First with tcp port wait, then with ssh connection wait
|
static HostAndPortChecker |
create(com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort hostAndPort) |
static HostAndPortChecker |
create(String host,
int port) |
boolean |
openSocket() |
boolean |
withEveryRetryWaitFor(int time,
TimeUnit units)
Use
openSocket() to check. |
HostAndPortChecker |
withRetries(int retries) |
HostAndPortChecker |
withSshTimeout(int time,
TimeUnit units) |
public static HostAndPortChecker create(com.github.kostyasha.yad_docker_java.com.google.common.net.HostAndPort hostAndPort)
hostAndPort
- hostname and port to connect topublic static HostAndPortChecker create(String host, int port)
public HostAndPortChecker withRetries(int retries)
public HostAndPortChecker withSshTimeout(int time, TimeUnit units)
public boolean openSocket()
public boolean withEveryRetryWaitFor(int time, TimeUnit units)
openSocket()
to check.
Retries while attempts reached with delaypublic void bySshWithEveryRetryWaitFor(int time, TimeUnit units) throws IOException
IOException
- if no retries leftCopyright © 2016–2020. All rights reserved.