java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,IpAddress>
com.aoindustries.aoserv.client.CachedObject<Integer,IpAddress>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<IpAddress>
com.aoindustries.aoserv.client.net.IpAddress
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,SingleTableObject<Integer,
IpAddress>
Each
IpAddress
represents a unique IPv4 address. Two of the IP
addresses exist on every server, WILDCARD_IP
and LOOPBACK_IP
.
Every other IP address is assigned to a specific Server
. IP
addresses may be assigned to a specific Package
and may have
a monthly rate associated with them.- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
Fields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
Constructor Summary
ConstructorDescriptionDeprecated.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getColumnImpl
(int i) Determines when thisIpAddress
was created.int
Gets the external IP address, if different than ip_address.int
getId()
static Integer
getIntForIpAddress
(String ipAddress) static String
getIpAddressForInt
(int i) int
void
Initializes this object from the raw database contents.boolean
isAlias()
boolean
boolean
isDhcp()
boolean
boolean
isUsed()
boolean
Deprecated.Replace with getInetAddress().isUnspecified()void
void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
setDhcpAddress
(InetAddress ipAddress) void
setHostname
(DomainName hostname) Sets the hostname for thisIpAddress
.void
setPackage
(Package pk) Sets thePackage
.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
Methods inherited from class com.aoindustries.aoserv.client.AoservObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxId, getLinuxUserName, getMacAddress, getMysqlDatabaseName, getMysqlServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
Field Details
-
COLUMN_IP_ADDRESS_name
- See Also:
-
COLUMN_DEVICE_name
- See Also:
-
LOOPBACK_IP
- See Also:
-
WILDCARD_IP
- See Also:
-
-
Constructor Details
-
IpAddress
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
getIntForIpAddress
- Throws:
IllegalArgumentException
-
getIpAddressForInt
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
IpAddress>
-
getId
public int getId() -
getInetAddress
-
getDevice_id
public int getDevice_id() -
getDevice
- Throws:
SQLException
IOException
-
isAlias
public boolean isAlias() -
getHostname
-
getPackage_id
public int getPackage_id() -
getPackage
- Throws:
IOException
SQLException
-
getCreated
Determines when thisIpAddress
was created. The created time is reset when the address is allocated to a differentPackage
, which allows the automated accounting to start the billing on the correct day of the month. -
getNetBinds
- Throws:
IOException
SQLException
-
isAvailable
public boolean isAvailable() -
isOverflow
public boolean isOverflow() -
isDhcp
public boolean isDhcp() -
getExternalInetAddress
Gets the external IP address, if different than ip_address. -
getNetMask
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
IpAddress>
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
IpAddress> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
IpAddress> - Throws:
IOException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
IpAddress> - Throws:
IOException
-
isUsed
- Throws:
IOException
SQLException
-
isWildcard
Deprecated.Replace with getInetAddress().isUnspecified() -
moveTo
- Throws:
IOException
SQLException
-
setHostname
Sets the hostname for thisIpAddress
.- Throws:
IOException
SQLException
-
setPackage
Sets thePackage
. The package may only be set if the IP Address is not used by other resources.- Throws:
IOException
SQLException
-
setDhcpAddress
- Throws:
IOException
SQLException
-
getMonitoring
- Throws:
IOException
SQLException
-