|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.snmp.snmp2.SnmpEngineTable
The SnmpEngineTable maintains a lsit of SnmpEngineEntry objects and provides methods to operate on list. Methods are povided to add, retrive and remove SnmpEngineEntry objects. The API users need not instantiate this class as it is instantiated from the SnmpAPI constructor. The SnmpAPI provides methods to access the SnmpEngineTable instance.
This class also provides methods to serialize and deSerialize the list of SnmpEngineEntry objects. The SnmpEngineEntry objects are always serialized in the file EngineEntry.ser. The serialization will not work in case of applets using the serialization methods. This will be fixed in the future release.
SnmpEngineEntry
,
SnmpAPI
, Serialized FormMethod Summary | |
boolean |
addEntry(SnmpEngineEntry entry)
Adds the SnmpEngineEntry to the list of SnmpEngineEntry objects maintained in this class. |
void |
deSerialize()
DeSerializes the file "EngineEntry.ser" to get a list of SnmpEngineEntry objects. |
SnmpEngineEntry |
getEntry(java.lang.String address,
int port)
Returns the SnmpEngineEntry object corresponding to the particular host and port from the list SnmpEngineEntry objects. |
java.util.Enumeration |
getEnumeration()
Returns an enumeration of all the SnmpEngineEntry objects maintained. |
boolean |
isV3DatabaseFlag()
Gets the Database flag for this SnmpAPI instance. |
void |
readFromDatabase()
Gets a list of SnmpEngineEntry objects and puts it in the hashtable. |
void |
removeEntry(SnmpEngineEntry entry)
Delets the particular SnmpEngineEntry from the list of SnmpEngineEntry objects. |
void |
removeEntry(java.lang.String address,
int port)
Deletes the SnmpEngineEntry from the list of SnmpEngineEntry objects corresponding to the hostName and port specified. |
void |
serialize()
Stores the list of SnmpEngineEntry objects in the serialized file "EngineEntry.ser". |
void |
setNullTable()
Clears the list of SnmpEngineEntry objects. |
void |
setV3DatabaseFlag(boolean dbFlag)
Sets the Database flag. |
void |
writeToDatabase()
Stores the list of SnmpEngineEntry objects in the database |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.util.Enumeration getEnumeration()
public void setNullTable()
public void setV3DatabaseFlag(boolean dbFlag)
dbFlag
- the database flag to be set on this SnmpAPI instance.public boolean isV3DatabaseFlag()
public boolean addEntry(SnmpEngineEntry entry)
entry
- The SnmpEngineEntry which needs to be added to the list of
SnmpEngineEntry objects.public SnmpEngineEntry getEntry(java.lang.String address, int port)
adddress
- The hostName of the SnmpEngineEntry object to be
retrived.port
- The port of the SnmpEngineEntry object to be retrived.
It should be passed as -1 in the case of independent protocol.public void removeEntry(java.lang.String address, int port)
adddress
- The hostName of the SnmpEngineEntry object to be
deleted.port
- The port of the SnmpEngineEntry object to be deleted.
It should be passed as -1 in the case of independent protocols.public void removeEntry(SnmpEngineEntry entry)
entry
- The SnmpEngineEntry which is to be deleted from the list
of SnmpEngineEntry objects.public void serialize()
public void deSerialize()
public void writeToDatabase()
public void readFromDatabase() throws java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |