public class HostEntry extends Object implements Serializable, Cloneable
Hostnames and IP address entries that are added to the
/etc/hosts
file of a container via the
extraHosts
parameter of its ContainerDefinition.
Constructor and Description |
---|
HostEntry() |
Modifier and Type | Method and Description |
---|---|
HostEntry |
clone() |
boolean |
equals(Object obj) |
String |
getHostname()
The hostname to use in the
/etc/hosts entry. |
String |
getIpAddress()
The IP address to use in the
/etc/hosts entry. |
int |
hashCode() |
void |
setHostname(String hostname)
The hostname to use in the
/etc/hosts entry. |
void |
setIpAddress(String ipAddress)
The IP address to use in the
/etc/hosts entry. |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
HostEntry |
withHostname(String hostname)
The hostname to use in the
/etc/hosts entry. |
HostEntry |
withIpAddress(String ipAddress)
The IP address to use in the
/etc/hosts entry. |
public String getHostname()
/etc/hosts
entry./etc/hosts
entry.public void setHostname(String hostname)
/etc/hosts
entry.hostname
- The hostname to use in the /etc/hosts
entry.public HostEntry withHostname(String hostname)
/etc/hosts
entry.
Returns a reference to this object so that method calls can be chained together.
hostname
- The hostname to use in the /etc/hosts
entry.public String getIpAddress()
/etc/hosts
entry./etc/hosts
entry.public void setIpAddress(String ipAddress)
/etc/hosts
entry.ipAddress
- The IP address to use in the /etc/hosts
entry.public HostEntry withIpAddress(String ipAddress)
/etc/hosts
entry.
Returns a reference to this object so that method calls can be chained together.
ipAddress
- The IP address to use in the /etc/hosts
entry.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.