|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdevices.Attribute
Attributes are the actual data elements of interest on an interface. Some attributes are static and known (e.g., syntax). Others track the dynamic aspects of the interface (e.g., I/O). This class holds the information about a dynamic attribute. That attribute will be polled at certain intervals to retrieve the attribute's value.
| Field Summary | |
static java.lang.String |
IF_IN_ERRORS
|
static java.lang.String |
IF_IN_OCTETS
|
static java.lang.String |
IF_OUT_ERRORS
|
static java.lang.String |
IF_OUT_OCTETS
|
| Constructor Summary | |
Attribute(java.sql.Connection dbConn,
long deviceID,
int ifIndex,
int oid)
Query the database and create a Device from the query results. |
|
Attribute(long deviceID,
int ifIndex,
int oid,
java.lang.String oidName,
int pollFrequency,
int maxPollLimit,
int minThreshold,
int maxThreshold,
boolean monitored,
boolean removed)
Create a full Attribute object. |
|
Attribute(java.sql.ResultSet sqlResults)
Create an Attribute from a database query result set. |
|
| Method Summary | |
boolean |
dbInsertAttribute(java.sql.Connection dbConn)
Insert a new Attribute into the database. |
boolean |
dbUpdateAttribute(java.sql.Connection dbConn)
Update detail fields in an Attribute record in the database. |
long |
getDeviceID()
Getters |
int |
getIfIndex()
|
int |
getMaxPollLimit()
|
int |
getMaxThreshold()
|
int |
getMinThreshold()
|
int |
getOid()
|
java.lang.String |
getOidName()
|
int |
getPollFrequency()
|
boolean |
isMonitored()
|
boolean |
isRemoved()
|
void |
setDeviceID(long deviceID)
Setters |
void |
setIfIndex(int ifIndex)
|
void |
setMaxPollLimit(int maxPollLimit)
|
void |
setMaxThreshold(int maximumThreshold)
|
void |
setMinThreshold(int minimumThreshold)
|
void |
setMonitored(boolean monitored)
|
void |
setOid(int oid)
|
void |
setOidName(java.lang.String oidName)
|
void |
setPollFrequency(int pollFrequency)
|
void |
setPollInfo(int frequency,
int limit)
Set the Attribute's polling vlaues. |
void |
setRemoved(boolean removed)
|
void |
setThresholds(int min,
int max)
|
java.lang.String |
toString()
Convert the Attribute object into a printable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String IF_IN_OCTETS
public static final java.lang.String IF_IN_ERRORS
public static final java.lang.String IF_OUT_OCTETS
public static final java.lang.String IF_OUT_ERRORS
| Constructor Detail |
public Attribute(long deviceID,
int ifIndex,
int oid,
java.lang.String oidName,
int pollFrequency,
int maxPollLimit,
int minThreshold,
int maxThreshold,
boolean monitored,
boolean removed)
deviceID - long value of the Device's DB record IDifIndex - index of the DeviceInterface within the Deviceoid - unique part of the OID for each attributepollFrequency - how often to poll in secondsmaxPollLimit - minThreshold - maxThreshold - monitored - monitoring state of the Attributeremoved - availability of the Attribute
public Attribute(java.sql.Connection dbConn,
long deviceID,
int ifIndex,
int oid)
throws java.sql.SQLException
dbConn - Connection to the databasedeviceID - long value of the Device's DB record IDifIndex - index of the DeviceInterface within the Deviceoid - unique part of the OID for each attribute
public Attribute(java.sql.ResultSet sqlResults)
throws java.sql.SQLException
sqlResults - single result set from a database query of the Attribute table| Method Detail |
public boolean dbInsertAttribute(java.sql.Connection dbConn)
public boolean dbUpdateAttribute(java.sql.Connection dbConn)
dbConn - Connection to the database
public java.lang.String toString()
public void setDeviceID(long deviceID)
public void setIfIndex(int ifIndex)
public void setOid(int oid)
public void setOidName(java.lang.String oidName)
public void setPollFrequency(int pollFrequency)
public void setMaxPollLimit(int maxPollLimit)
public void setMinThreshold(int minimumThreshold)
public void setMaxThreshold(int maximumThreshold)
public void setMonitored(boolean monitored)
public void setRemoved(boolean removed)
public long getDeviceID()
public int getIfIndex()
public int getOid()
public java.lang.String getOidName()
public int getPollFrequency()
public int getMinThreshold()
public int getMaxPollLimit()
public int getMaxThreshold()
public boolean isMonitored()
public boolean isRemoved()
public void setPollInfo(int frequency,
int limit)
frequency - limit -
public void setThresholds(int min,
int max)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||