- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Host>
-
- com.aoindustries.aoserv.client.net.Host
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Host>,Comparable<Host>
public final class Host extends CachedObjectIntegerKey<Host> implements Comparable<Host>
AServerstores the details about a single, physical server.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_NAME_namestatic StringCOLUMN_PACKAGE_namestatic StringHIDDEN_PASSWORDThe daemon key is only available toMasterUsers.-
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
Constructors Constructor Description Host()
-
Method Summary
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
-
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 Detail
-
COLUMN_PACKAGE_name
public static final String COLUMN_PACKAGE_name
- See Also:
- Constant Field Values
-
COLUMN_NAME_name
public static final String COLUMN_NAME_name
- See Also:
- Constant Field Values
-
HIDDEN_PASSWORD
public static final String HIDDEN_PASSWORD
The daemon key is only available toMasterUsers. This value is used in place of the key when not accessible.- See Also:
- Constant Field Values
-
-
Method Detail
-
addAccount
public void addAccount(Account.Name accounting, String contractVersion, Account parent, boolean can_add_backup_servers, boolean can_add_businesses, boolean can_see_prices, boolean billParent) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
addNetBind
public int addNetBind(Package pk, IpAddress ia, Port port, AppProtocol appProtocol, boolean monitoringEnabled, Set<FirewallZone.Name> firewalldZones) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getLinuxServer
public Server getLinuxServer() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getPhysicalServer
public PhysicalServer getPhysicalServer() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getVirtualServer
public VirtualServer getVirtualServer() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getAccounts
public List<Account> getAccounts() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Host>
-
getOperatingSystemVersion_id
public int getOperatingSystemVersion_id()
-
getOperatingSystemVersion
public OperatingSystemVersion getOperatingSystemVersion() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getPackage
public Package getPackage() throws IOException, SQLException
May be filtered.- Throws:
IOExceptionSQLException- See Also:
getPackageId()
-
getPackageId
public int getPackageId()
Gets the package id, will not be filtered.- See Also:
getPackage()
-
getName
public String getName()
-
isMonitoringEnabled
public boolean isMonitoringEnabled()
-
getServerFarm
public ServerFarm getServerFarm() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getDescription
public String getDescription()
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Host>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,Host>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Host>- Throws:
IOException
-
toStringImpl
public String toStringImpl() throws IOException, SQLException
Description copied from class:AOServObjectAOServObject.toString()implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAOServObject.toString()on the key (fromAOServObject.getKey()). When the key isnull, uses the default implementation fromObject.toString().- Overrides:
toStringImplin classCachedObjectIntegerKey<Host>- Throws:
IOExceptionSQLException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Host>- Throws:
IOException
-
getFailoverFileReplications
public List<FileReplication> getFailoverFileReplications() throws IOException, SQLException
Gets the list of all replications coming from this server.- Throws:
IOExceptionSQLException
-
getFirewalldZones
public List<FirewallZone> getFirewalldZones() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetBind
public Bind getNetBind(IpAddress ipAddress, Port port) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetBinds
public List<Bind> getNetBinds() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetBinds
public List<Bind> getNetBinds(IpAddress ipAddress) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetBinds
public List<Bind> getNetBinds(AppProtocol protocol) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetDevice
public Device getNetDevice(String deviceID) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getNetDevices
public List<Device> getNetDevices() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getIPAddresses
public List<IpAddress> getIPAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getAvailableIPAddress
public IpAddress getAvailableIPAddress() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
compareTo
public int compareTo(Host o)
- Specified by:
compareToin interfaceComparable<Host>
-
-