com.adventnet.snmp.snmp2
Class SnmpTargetParamsTable

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpTargetParamsTable
All Implemented Interfaces:
java.io.Serializable

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

v3 only This class maintains a list of all SnmpTargetParamsEntry objects and provides methods to operate on the list. Methods are provided to add, retrive and remove SnmpTargetParamsEntry objects. The API user need not instantiate this class as it is instantiated from the SnmpAPI constructor. The SnmpAPI provides methods to access the SnmpTargetParamsTable instance. Once a new SnmpTargetParamsEntry object is created, it has to be added to the the SnmpTargetParamsTable using the add method provided.

See Also:
SnmpTargetParamsEntry, SnmpAPI, Serialized Form

Constructor Summary
SnmpTargetParamsTable()
           
 
Method Summary
 boolean addEntry(SnmpTargetParamsEntry entry)
          Adds the SnmpTargetParamsEntry object to the list of SnmpTargetParamsEntry objects maintained in this class.
 void deSerialize()
          DeSerializes the file "ParamsEntry.ser" to get a list of SnmpTargetParamsEntry objects.
 void deSerialize(java.io.ObjectInputStream in)
          DeSerializes the SnmpTargetParamsEntry objects from the input Stream to the list of SnmpTargetParamsEntry objects.
 SnmpTargetParamsEntry getEntry(byte[] paramsName)
          Returns the SnmpTargetParamsEntry object corresponding to the particular targetParamsName from the list of SnmpTargetParamsEntry objects.
 java.util.Enumeration getEnumeration()
          Returns an enumeration of all the SnmpTargetParamsEntry objects maintaied in this class.
 void removeAllEntries()
          Deletes all the SnmpTargetParamsEntry objects maintained in this class.
 void removeEntry(byte[] paramsName)
          Deletes the SnmpTargetParamsEntry corresponding to the targetParamsName from the list of SnmpTargetParamsEntry objects.
 void removeEntry(SnmpTargetParamsEntry entry)
          Deletes this particlar SnmpTargetParamsEntry object from the list of SnmpTargetParamsEntry objects.
 void serialize()
          Stores the list of SnmpTargetParamsEntry objects in the serialized file "ParamsEntry.ser"
 void serialize(java.io.ObjectOutputStream out)
          Serializes the list of SnmpTargetParamsEntry objects into the output Stream specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpTargetParamsTable

public SnmpTargetParamsTable()
Method Detail

getEnumeration

public java.util.Enumeration getEnumeration()
Returns an enumeration of all the SnmpTargetParamsEntry objects maintaied in this class.

Returns:
The enumeration of all the SnmpTargetParamsEntry objects maintained in this class.

removeAllEntries

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


addEntry

public boolean addEntry(SnmpTargetParamsEntry entry)
Adds the SnmpTargetParamsEntry object to the list of SnmpTargetParamsEntry objects maintained in this class.

Parameters:
entry - The SnmpTargetParamsEntry which needs to be added to the list of SnmpTargetParamsEntry objects.
Returns:
True if the SnmpTargetParamsEntry was successfully added to the list of SnmpTargetParamsEntry objects. False if the SnmpTargetParamsEntry object is already present in the list of SnmpTargetParamsEntry objects.

getEntry

public SnmpTargetParamsEntry getEntry(byte[] paramsName)
Returns the SnmpTargetParamsEntry object corresponding to the particular targetParamsName from the list of SnmpTargetParamsEntry objects.

Returns:
The SnmpTargetParamsEntry object corresponding to the paramsName from the list of SnmpTargetParamsEntry objects.

removeEntry

public void removeEntry(byte[] paramsName)
Deletes the SnmpTargetParamsEntry corresponding to the targetParamsName from the list of SnmpTargetParamsEntry objects.

Parameters:
paramsName - The targetParamsName for which the SnmpTargetParamsEntry object is to be deleted.

removeEntry

public void removeEntry(SnmpTargetParamsEntry entry)
Deletes this particlar SnmpTargetParamsEntry object from the list of SnmpTargetParamsEntry objects.

Parameters:
entry - The SnmpTargetParamsEntry object that is to be deleted.

serialize

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


deSerialize

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


serialize

public void serialize(java.io.ObjectOutputStream out)
Serializes the list of SnmpTargetParamsEntry objects into the output Stream specified.

Parameters:
out - The ObjectOutputStream for serialization

deSerialize

public void deSerialize(java.io.ObjectInputStream in)
DeSerializes the SnmpTargetParamsEntry objects from the input Stream to the list of SnmpTargetParamsEntry objects.

Parameters:
in - The ObjectInputStream for deSerialization.


Copyright (c)2010 ZOHO Corp., All Rights Reserved