com.adventnet.snmp.snmp2
Class SnmpNotifyTable

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpNotifyTable

public class SnmpNotifyTable
extends java.lang.Object
implements java.io.Serializable

This class maintains a list of all SnmpNotifyEntry objects and provides methods to operate on the list.

See Also:
Serialized Form

Field Summary
(package private)  java.util.Hashtable notifyTable
           
(package private) static java.lang.String serUserFileName
           
 
Constructor Summary
(package private) SnmpNotifyTable()
          Default Constructor.
 
Method Summary
 boolean addEntry(SnmpNotifyEntry entry)
          Adds the SnmpNotifyEntry object to the list of SnmpNotifyEntry objects maintained in this class.
 void deSerialize()
          DeSerializes the file "NotifyEntry.ser" to get a list of SnmpNotifyEntry objects.
 void deSerialize(java.io.ObjectInputStream in)
          DeSerializes the SnmpNotifyEntry objects from the particular input Stream to the list of SnmpNotifyEntry objects.
 SnmpNotifyEntry getEntry(byte[] index)
          Gets the SnmpNotifyEntry associated with the specified key.
 SnmpNotifyEntry getEntry(java.lang.Object key)
          Gets the SnmpNotifyEntry associated with the specified key.
 java.util.Enumeration getEnumeration()
          Returns an enumeration of all the SnmpNotifyEntry objects maintained in this class.
 void removeAllEntries()
          Deletes all the SnmpNotifyEntry objects maintained in this class.
 boolean removeEntry(byte[] index)
          Deletes the SnmpNotifyEntry corresponding to the index from the list of SnmpNotifyEntry objects.
 boolean removeEntry(SnmpNotifyEntry entry)
          Deletes this particlar SnmpNotifyEntry object from the list of SnmpNotifyEntry objects.
 void serialize()
          Stores the list of SnmpNotifyEntry objects in the serialized file "NotifyEntry.ser"
 void serialize(java.io.ObjectOutputStream out)
          Serializes the list of SnmpNotifyEntry objects into particular output Stream specified.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

notifyTable

java.util.Hashtable notifyTable

serUserFileName

static final java.lang.String serUserFileName
Constructor Detail

SnmpNotifyTable

SnmpNotifyTable()
Default Constructor.
Method Detail

getEnumeration

public java.util.Enumeration getEnumeration()
Returns an enumeration of all the SnmpNotifyEntry objects maintained in this class.
Returns:
The enumeration of all the SnmpNotifyEntry objects maintained in this class.

removeAllEntries

public void removeAllEntries()
Deletes all the SnmpNotifyEntry objects maintained in this class. Thus the list which maintains the list of SnmpNotifyEntry objects will be null.

addEntry

public boolean addEntry(SnmpNotifyEntry entry)
Adds the SnmpNotifyEntry object to the list of SnmpNotifyEntry objects maintained in this class.
Parameters:
entry - The SnmpNotifyEntry which needs to be added to the list of SnmpNotifyEntry objects.
Returns:
True, if the SnmpNotifyEntry was successfully added to the list of SnmpNotifyEntry objects. False, if the SnmpNotifyEntry object is already present in the list of SnmpNotifyEntry objects or the rowStatus is not either of the two mentioned above.
Throws:
java.lang.NullPointerException - if the entry is null.

getEntry

public SnmpNotifyEntry getEntry(java.lang.Object key)
Gets the SnmpNotifyEntry associated with the specified key.
Parameters:
key - The key corresponding to which the SnmpNotifyEntry is to be retrieved.
Returns:
The SnmpNotifyEntry corresponding to the specified key.

getEntry

public SnmpNotifyEntry getEntry(byte[] index)
Gets the SnmpNotifyEntry associated with the specified key.
Parameters:
index - The index corresponding to which the SnmpNotifyEntry is to be retrieved.
Returns:
The SnmpNotifyEntry corresponding to the specified key.

removeEntry

public boolean removeEntry(byte[] index)
Deletes the SnmpNotifyEntry corresponding to the index from the list of SnmpNotifyEntry objects.
Parameters:
index - The index for which the SnmpNotifyEntry object is to be deleted.
Throws:
java.lang.NullPointerException - if the index is null.

removeEntry

public boolean removeEntry(SnmpNotifyEntry entry)
Deletes this particlar SnmpNotifyEntry object from the list of SnmpNotifyEntry objects.
Parameters:
entry - The SnmpNotifyEntry object that is to be deleted.

serialize

public void serialize()
Stores the list of SnmpNotifyEntry objects in the serialized file "NotifyEntry.ser"

deSerialize

public void deSerialize()
DeSerializes the file "NotifyEntry.ser" to get a list of SnmpNotifyEntry objects.

serialize

public void serialize(java.io.ObjectOutputStream out)
Serializes the list of SnmpNotifyEntry objects into particular output Stream specified.
Parameters:
out - The ObjectOutputStream for serialization

deSerialize

public void deSerialize(java.io.ObjectInputStream in)
DeSerializes the SnmpNotifyEntry objects from the particular input Stream to the list of SnmpNotifyEntry objects.
Parameters:
in - The ObjectInputStream for deSerialization