T
- is the an appropriate subclass of IPAddresspublic abstract class DhcpServerConfigIP<T extends IPAddress> extends Object implements DhcpServerConfig
Constructor and Description |
---|
DhcpServerConfigIP(String interfaceName,
boolean enabled,
T subnet,
T routerAddress,
T subnetMask,
int defaultLeaseTime,
int maximumLeaseTime,
short prefix,
T rangeStart,
T rangeEnd,
boolean passDns,
List<T> dnsServers)
The basic Constructor for a DhcpServerConfigIP
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
getDefaultLeaseTime()
Returns the default lease time offered by the DHCP server
|
List<T> |
getDnsServers()
Returns the DNS servers associated with this DhcpServerConfig that will be passed to DHCP clients
|
String |
getInterfaceName()
Returns the interface name associated with this DhcpServerConfig
|
int |
getMaximumLeaseTime()
Returns the maximum lease time offered by the DHCP server
|
short |
getPrefix()
Returns the network prefix length for this DHCP server's address range
This is also known as the subnet mask in the context of IPv4 addresses.
|
T |
getRangeEnd()
Returns the ending DHCP server InetAddress to provide to DHCP clients.
|
T |
getRangeStart()
Returns the starting DHCP server InetAddress to provide to DHCP clients.
|
T |
getRouterAddress()
Returns the router IP address associated with this DhcpServerConfig
|
T |
getSubnet()
Returns the subnet associated with this DhcpServerConfig
|
T |
getSubnetMask()
Returns the subnet mask associated with this DhcpServerConfig
|
boolean |
isEnabled()
Returns the
boolean status associated with this DhcpServerConfig |
boolean |
isPassDns()
Returns whether or not DHCP clients should get DNS services.
|
boolean |
isValid()
Checks whether or not this configuration is valid.
|
void |
setDefaultLeaseTime(int defaultLeaseTime)
sets the default lease time for DHCP clients
|
void |
setDnsServers(List<T> m_dnsServers)
the DNS servers to pass to DHCP clients if passDns is set to true
|
void |
setEnabledRouterMode(boolean enabled)
sets the status for the DhcpServerConfig
|
void |
setInterfaceName(String interfaceName)
sets the interface name for the DhcpServerConfig
|
void |
setMaximumLeaseTime(int maximumLeaseTime)
sets the maximum lease time for DHCP clients
|
void |
setPassDns(boolean passDns)
whether or not to pass DNS to DHCP clients
|
void |
setPrefix(short prefix)
sets the network prefix for the DhcpServerConfig
|
void |
setRangeEnd(T rangeEnd)
sets the ending IPAddress in the pool for the DHCP clients
|
void |
setRangeStart(T m_rangeStart)
sets the starting IPAddress in the pool for the DHCP clients
|
void |
setRouterAddress(T routerAddress)
sets the router IPAddress for the DhcpServerConfig
|
void |
setSubnet(T subnet)
sets the subnet for the DhcpServerConfig
|
void |
setSubnetMask(T subnetMask)
sets the subnet mask for the DhcpServerConfig
|
String |
toString() |
public DhcpServerConfigIP(String interfaceName, boolean enabled, T subnet, T routerAddress, T subnetMask, int defaultLeaseTime, int maximumLeaseTime, short prefix, T rangeStart, T rangeEnd, boolean passDns, List<T> dnsServers)
interfaceName
- the interface name associated with the DhcpServerConfigenabled
- the status of the DhcpServer as a booleansubnet
- the subnet of the DhcpServerConfigrouterAddress
- the router IPAddresssubnetMask
- the subnet mask of the DhcpServerConfigdefaultLeaseTime
- the default lease time to issue to DHCP clientsmaximumLeaseTime
- the maximum lease time to issue to DHCP clientsprefix
- the network prefix associated with the DhcpServerConfigrangeStart
- the network starting address to issue to DHCP clientsrangeEnd
- the network ending address to issue to DHCP clientspassDns
- whether or not to pass DNS to DHCP clientsdnsServers
- the DNS servers that will get passed to DHCP clients if passDns is truepublic String getInterfaceName()
DhcpServerConfig
getInterfaceName
in interface DhcpServerConfig
String
representing the interface namepublic void setInterfaceName(String interfaceName)
interfaceName
- the interface name in the form of a String
public boolean isEnabled()
DhcpServerConfig
boolean
status associated with this DhcpServerConfigisEnabled
in interface DhcpServerConfig
boolean
representing the statuspublic void setEnabledRouterMode(boolean enabled)
enabled
- the Dhcp Server status in the form of a boolean
public T getSubnet()
DhcpServerConfig
getSubnet
in interface DhcpServerConfig
IPAddress
representing the subnetpublic void setSubnet(T subnet)
subnet
- the subnet in the form of a IPAddress
public T getRouterAddress()
DhcpServerConfig
getRouterAddress
in interface DhcpServerConfig
IPAddress
representing the router IP addresspublic void setRouterAddress(T routerAddress)
routerAddress
- the router IPAddress in the form of a IPAddress
public T getSubnetMask()
DhcpServerConfig
getSubnetMask
in interface DhcpServerConfig
IPAddress
representing the subnet maskpublic void setSubnetMask(T subnetMask)
subnetMask
- the subnet mask in the form of a IPAddress
public int getDefaultLeaseTime()
DhcpServerConfig
getDefaultLeaseTime
in interface DhcpServerConfig
public void setDefaultLeaseTime(int defaultLeaseTime)
defaultLeaseTime
- the default lease timepublic int getMaximumLeaseTime()
DhcpServerConfig
getMaximumLeaseTime
in interface DhcpServerConfig
public void setMaximumLeaseTime(int maximumLeaseTime)
maximumLeaseTime
- the maximum lease timepublic short getPrefix()
DhcpServerConfig
getPrefix
in interface DhcpServerConfig
public void setPrefix(short prefix)
prefix
- the prefixpublic T getRangeStart()
DhcpServerConfig
getRangeStart
in interface DhcpServerConfig
public void setRangeStart(T m_rangeStart)
m_rangeStart
- the starting IPAddresspublic T getRangeEnd()
DhcpServerConfig
getRangeEnd
in interface DhcpServerConfig
public void setRangeEnd(T rangeEnd)
m_rangeEnd
- the ending IPAddresspublic boolean isPassDns()
DhcpServerConfig
isPassDns
in interface DhcpServerConfig
public void setPassDns(boolean passDns)
passDns
- true to pass, false to notpublic List<T> getDnsServers()
DhcpServerConfig
getDnsServers
in interface DhcpServerConfig
List
of IPAddresses that represent the DNS serverspublic void setDnsServers(List<T> m_dnsServers)
m_dnsServers
- the DNS servers to passpublic boolean isValid()
NetConfig
Copyright © 2014. All Rights Reserved.