public class HostEntry
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Hostnames and IP address entries that are added to the
/etc/hosts
file of a container via the extraHosts
parameter of its ContainerDefinition.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
hostname
The hostname to use in the
/etc/hosts entry. |
private java.lang.String |
ipAddress
The IP address to use in the
/etc/hosts entry. |
Constructor and Description |
---|
HostEntry() |
Modifier and Type | Method and Description |
---|---|
HostEntry |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHostname()
The hostname to use in the
/etc/hosts entry. |
java.lang.String |
getIpAddress()
The IP address to use in the
/etc/hosts entry. |
int |
hashCode() |
void |
setHostname(java.lang.String hostname)
The hostname to use in the
/etc/hosts entry. |
void |
setIpAddress(java.lang.String ipAddress)
The IP address to use in the
/etc/hosts entry. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
HostEntry |
withHostname(java.lang.String hostname)
The hostname to use in the
/etc/hosts entry. |
HostEntry |
withIpAddress(java.lang.String ipAddress)
The IP address to use in the
/etc/hosts entry. |
private java.lang.String hostname
The hostname to use in the /etc/hosts
entry.
private java.lang.String ipAddress
The IP address to use in the /etc/hosts
entry.
public void setHostname(java.lang.String hostname)
The hostname to use in the /etc/hosts
entry.
hostname
- The hostname to use in the /etc/hosts
entry.public java.lang.String getHostname()
The hostname to use in the /etc/hosts
entry.
/etc/hosts
entry.public HostEntry withHostname(java.lang.String hostname)
The hostname to use in the /etc/hosts
entry.
hostname
- The hostname to use in the /etc/hosts
entry.public void setIpAddress(java.lang.String ipAddress)
The IP address to use in the /etc/hosts
entry.
ipAddress
- The IP address to use in the /etc/hosts
entry.public java.lang.String getIpAddress()
The IP address to use in the /etc/hosts
entry.
/etc/hosts
entry.public HostEntry withIpAddress(java.lang.String ipAddress)
The IP address to use in the /etc/hosts
entry.
ipAddress
- The IP address to use in the /etc/hosts
entry.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public HostEntry clone()
clone
in class java.lang.Object