public class DockerPort extends Object
Constructor and Description |
---|
DockerPort(String ip,
int externalPort,
int internalPort) |
DockerPort(String ip,
PortMapping portMapping) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getExternalPort() |
int |
getInternalPort() |
String |
getIp() |
int |
hashCode() |
String |
inFormat(String format)
Formats the docker port into a particular form.
|
boolean |
isHttpResponding(Function<DockerPort,String> urlFunction,
boolean andCheckStatus) |
SuccessOrFailure |
isHttpRespondingSuccessfully(Function<DockerPort,String> urlFunction,
boolean andCheckStatus) |
boolean |
isListeningNow() |
String |
toString() |
public DockerPort(String ip, int externalPort, int internalPort)
public DockerPort(String ip, PortMapping portMapping)
public String getIp()
public int getExternalPort()
public int getInternalPort()
public boolean isListeningNow()
public boolean isHttpResponding(Function<DockerPort,String> urlFunction, boolean andCheckStatus)
public SuccessOrFailure isHttpRespondingSuccessfully(Function<DockerPort,String> urlFunction, boolean andCheckStatus)
public String inFormat(String format)
Example: dockerPort.inFormat("https://$HOST:$EXTERNAL_PORT/api")
Available options are:format
- a format string using the substitutions listed aboveDockerPort
in the specified formatCopyright © 2021 Pivotal Software, Inc.. All rights reserved.