- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Device>
-
- com.aoindustries.aoserv.client.net.Device
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Device>
public final class Device extends CachedObjectIntegerKey<Device>
Each server has multiple network devices, each listening on different IP addresses.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_DEVICE_ID_namestatic StringCOLUMN_SERVER_name-
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 Device()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBondingReport()Gets the bonding report from/proc/net/bonding/[p]bond#ornullif not a bonded device.InetAddressgetBroadcast()protected ObjectgetColumnImpl(int i)StringgetDeleteRoute()StringgetDescription()DeviceIdgetDeviceId()StringgetDeviceId_name()InetAddressgetGateway()HostgetHost()intgetId()IpAddressgetIPAddress(InetAddress inetAddress)List<IpAddress>getIPAddresses()MacAddressgetMacAddress()longgetMaxBitRate()Gets the maximum bit rate this interface can support or-1if unknown.longgetMonitoringBitRateCritical()Gets the 5-minute average that is considered a critical-priority alert or-1if no alert allowed at this level.longgetMonitoringBitRateHigh()Gets the 5-minute average that is considered a high-priority alert or-1if no alert allowed at this level.longgetMonitoringBitRateLow()Gets the 5-minute average that is considered a low-priority alert or-1if no alert allowed at this level.longgetMonitoringBitRateMedium()Gets the 5-minute average that is considered a medium-priority alert or-1if no alert allowed at this level.InetAddressgetNetwork()IpAddressgetPrimaryIPAddress()intgetServer_pkey()StringgetStatisticsReport()Table.TableIDgetTableID()voidinit(ResultSet result)Initializes this object from the raw database contents.booleanisMonitoringEnabled()The monitoring of a net_devices may be enabled or disabled.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)StringtoStringImpl()AOServObject.toString()implementation that is allowed to throw exceptions.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
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_SERVER_name
public static final String COLUMN_SERVER_name
- See Also:
- Constant Field Values
-
COLUMN_DEVICE_ID_name
public static final String COLUMN_DEVICE_ID_name
- See Also:
- Constant Field Values
-
-
Method Detail
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Device>
-
getId
public int getId()
-
getServer_pkey
public int getServer_pkey()
-
getHost
public Host getHost() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getDeviceId_name
public String getDeviceId_name()
-
getDeviceId
public DeviceId getDeviceId() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getDescription
public String getDescription()
-
getDeleteRoute
public String getDeleteRoute()
-
getGateway
public InetAddress getGateway()
-
getNetwork
public InetAddress getNetwork()
-
getBroadcast
public InetAddress getBroadcast()
-
getMacAddress
public MacAddress getMacAddress()
-
getMaxBitRate
public long getMaxBitRate()
Gets the maximum bit rate this interface can support or-1if unknown.
-
getMonitoringBitRateLow
public long getMonitoringBitRateLow()
Gets the 5-minute average that is considered a low-priority alert or-1if no alert allowed at this level.
-
getMonitoringBitRateMedium
public long getMonitoringBitRateMedium()
Gets the 5-minute average that is considered a medium-priority alert or-1if no alert allowed at this level.
-
getMonitoringBitRateHigh
public long getMonitoringBitRateHigh()
Gets the 5-minute average that is considered a high-priority alert or-1if no alert allowed at this level.
-
getMonitoringBitRateCritical
public long getMonitoringBitRateCritical()
Gets the 5-minute average that is considered a critical-priority alert or-1if no alert allowed at this level. This is the level that will alert people 24x7.
-
isMonitoringEnabled
public boolean isMonitoringEnabled()
The monitoring of a net_devices may be enabled or disabled.
-
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,Device>- 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,Device>- Throws:
IOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Device>- Throws:
IOException
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Device>
-
toStringImpl
public String toStringImpl() throws SQLException, IOException
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<Device>- Throws:
SQLExceptionIOException
-
getIPAddress
public IpAddress getIPAddress(InetAddress inetAddress) throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getIPAddresses
public List<IpAddress> getIPAddresses() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getPrimaryIPAddress
public IpAddress getPrimaryIPAddress() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getBondingReport
public String getBondingReport() throws IOException, SQLException
Gets the bonding report from/proc/net/bonding/[p]bond#ornullif not a bonded device.- Throws:
IOExceptionSQLException
-
getStatisticsReport
public String getStatisticsReport() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
-