|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdevices.Device
A network device (e.g., router or switch) of interest to GLTMon. A Device holds information gathered via SNMP and specific to its storage in a database (e.g., record ID).
| Constructor Summary | |
Device(java.sql.Connection dbConn,
long deviceID)
Query the database and create a Device from the query results. |
|
Device(java.sql.ResultSet sqlResults)
Create a Device from a database query result set. |
|
Device(java.lang.String ipAddress,
java.lang.String community,
java.lang.String sysName,
java.lang.String sysDescr,
int ifNumber,
long sysUpTime)
Create a bare Device as first discovered via SNMP. |
|
| Method Summary | |
boolean |
dbInsertDevice(java.sql.Connection dbConn)
Insert a new Device into the database. |
boolean |
dbUpdateDevice(java.sql.Connection dbConn)
Update all the fields in a Device to the database. |
boolean |
dbUpdateMonitored(java.sql.Connection dbConn)
Update a Device's monitored status. |
boolean |
dbUpdateSysUpTime(java.sql.Connection dbConn)
|
java.lang.String |
getCommunity()
Gets the community string of the Device. |
java.sql.Timestamp |
getDateCreated()
Gets the creation date of the Device. |
long |
getDeviceID()
Gets the ID of the Device. |
int |
getIfNumber()
Gets the number of Device Interfaces. |
java.lang.String |
getIpAddress()
Gets the IP address of the Device. |
java.lang.String |
getSysDescr()
Gets the description of the Device. |
java.lang.String |
getSysName()
Gets the name of the Device. |
long |
getSysUpTime()
Gets Device's up time. |
boolean |
isMonitored()
Gets the monitoring status of the Device. |
boolean |
isRemoved()
Gets the removed or present status of the Device. |
void |
remove()
Utility method to set removed to true. |
void |
setCommunity(java.lang.String community)
Sets the community string for the Device. |
void |
setDateCreated(java.sql.Timestamp dateCreated)
Sets the Device's database creation time. |
void |
setDeviceID(long deviceID)
Sets the ID of the Device. |
void |
setIfNumber(int ifNumber)
Sets the Device's number of Interfaces. |
void |
setIpAddress(java.lang.String ipAddress)
Sets the IP address of the Device. |
void |
setMonitored(boolean monitored)
Sets the monitoring status of the Device. |
void |
setRemoved(boolean removed)
Sets the removed status of the Device. |
void |
setSysDescr(java.lang.String sysDescr)
Sets the description of the Device. |
void |
setSysName(java.lang.String sysName)
Sets the name of the Device. |
void |
setSysUpTime(long sysUpTime)
Sets the Device's current up time. |
java.lang.String |
toString()
Convert the Device object into a printable String. |
void |
unremove()
Utility method to set removed to false. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Device(java.lang.String ipAddress,
java.lang.String community,
java.lang.String sysName,
java.lang.String sysDescr,
int ifNumber,
long sysUpTime)
ipAddress - IP address of the Devicecommunity - password for the DevicesysName - SNMP name of the DevicesysDescr - SNMP description of the DeviceifNumber - amount of interfaces on the DevicesysUpTime - amount of time elapsed since the Device was started
public Device(java.sql.Connection dbConn,
long deviceID)
throws java.sql.SQLException
dbConn - Connection to the databasedeviceID - record ID of the Device in the database
public Device(java.sql.ResultSet sqlResults)
throws java.sql.SQLException
sqlResults - single result set from a database query of the Device table| Method Detail |
public boolean dbInsertDevice(java.sql.Connection dbConn)
dbConn - Connection to a database
public boolean dbUpdateMonitored(java.sql.Connection dbConn)
dbConn - Connection to a databasepublic boolean dbUpdateSysUpTime(java.sql.Connection dbConn)
public boolean dbUpdateDevice(java.sql.Connection dbConn)
public java.lang.String toString()
public void setDeviceID(long deviceID)
deviceID - long value of the Device database record IDpublic void setIpAddress(java.lang.String ipAddress)
ipAddress - string containing the IP address of the Devicepublic void setCommunity(java.lang.String community)
community - string containing the community passwordpublic void setSysDescr(java.lang.String sysDescr)
sysDescr - string containing the description of the Devicepublic void setSysName(java.lang.String sysName)
sysName - string containing the name of the Devicepublic void setIfNumber(int ifNumber)
ifNumber - int count of the Device's number of interfacespublic void setSysUpTime(long sysUpTime)
sysUpTime - long ticks of the Device's up timepublic void setDateCreated(java.sql.Timestamp dateCreated)
dateCreated - java.sql.Timestamp of the Device's addition to the databasepublic void setMonitored(boolean monitored)
monitored - boolean indicating the desired monitoring status of the Devicepublic void setRemoved(boolean removed)
removed - boolean indicating the device's availability statuspublic void unremove()
public void remove()
public long getDeviceID()
public java.lang.String getIpAddress()
public java.lang.String getCommunity()
public java.lang.String getSysName()
public java.lang.String getSysDescr()
public int getIfNumber()
public long getSysUpTime()
public java.sql.Timestamp getDateCreated()
public boolean isMonitored()
public boolean isRemoved()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||