com.adventnet.snmp.snmp2.agent
Class SnmpTargetAddrExtTableRequestHandler

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
        |
        +--com.adventnet.snmp.snmp2.agent.SnmpTargetAddrExtTableRequestHandler

public class SnmpTargetAddrExtTableRequestHandler
extends SimpleRequestHandler

Handles all requests under snmpTargetAddrExtTable group


Field Summary
(package private)  SnmpAgent agentName
           
(package private)  SnmpAPI api
           
(package private)  java.util.Hashtable atomicTable
           
(package private)  java.lang.String fileDir
           
(package private)  java.lang.String format
           
(package private)  java.util.Vector snmpTargetAddrExtEntryVector
           
(package private) static int SNMPTARGETADDRMMS
           
(package private) static int SNMPTARGETADDRTMASK
           
(package private)  SnmpTargetAddrExtTable targetAddrExtTable
           
(package private)  SnmpTargetAddrTable targetAddrTable
           
(package private)  SnmpTargetAddrExtTableXMLToVector xmlToVector
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
instrumentHandler, listener, tableListener, writeEachTime
 
Constructor Summary
SnmpTargetAddrExtTableRequestHandler(SnmpAgent agentRef)
          Default constructor that takes the SnmpAgent as the argument.
SnmpTargetAddrExtTableRequestHandler(SnmpAgent agentRef, java.lang.String dirStr, java.lang.String fileName, java.lang.String format)
          Secondary constructor with Persistence support.
 
Method Summary
 boolean createAndAddSnmpTargetAddrExtEntry(java.lang.String targetAddrName, java.lang.Integer targetAddrMMS, java.lang.String targetAddrTMask)
          The method to create and Add a new Entry to the TargetAddrExtTable.
 SnmpTargetAddrExtEntry createSnmpTargetAddrExtEntry(java.lang.String targetAddrName, java.lang.Integer targetAddrMMS, java.lang.String targetAddrTMask)
          The method to create a new SnmpTargetAddrEntry.
 int[] getOidRep()
          Retrives the integer representation of OID
static int[] getSnmpTargetAddrExtTableOidRep()
          Gets the SnmpTargetAddrExtTable entry OID - int[] of {1,3,6,1,6,3,18,1,2,1}
protected  int[] getSubidList()
          Gets the subid list of the oid.
 java.util.Vector getTableVector()
          The method to get the Vector of SnmpTargetAddrEntries present in the SnmpTargetAddrTable.
protected  void processGetNextRequest(SnmpVarBind varb, AgentNode node, VarBindRequestEvent pe)
          Process the GetNext Request message which is received from PduRequestHandler.
protected  void processGetRequest(SnmpVarBind varb, AgentNode node, VarBindRequestEvent pe)
          Process the Get Request message which is received from PduRequestHandler.
protected  void processGetRequest(SnmpVarBind varb, int req, VarBindRequestEvent pe, SnmpTargetAddrExtEntry entry, byte[] targetAddrName)
           
protected  void processSetRequest(SnmpVarBind varb, AgentNode node, VarBindRequestEvent pe)
          Process the Set Request message which is received from PduRequestHandler.
 void serialize(java.io.ObjectOutputStream outMain)
          For serializing object
 void setTableVector(java.util.Vector targetAddrExtVec)
          The method to set the Vector of SnmpTargetAddrExtEntries.
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
addInstrumentHandler, addRegistrationListener, addTableListener, addUpdateListener, getInstrument, getMibVarHash, getNextRequest, getObjectHash, getObjectTypeHash, getRequest, getTableListener, isWriteEachTime, processGetNextRequest, processGetRequest, processSetRequest, removeRegistrationListener, removeUpdateListener, setRequest, setWriteEachTime, writeIntoFile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNMPTARGETADDRTMASK

static final int SNMPTARGETADDRTMASK

SNMPTARGETADDRMMS

static final int SNMPTARGETADDRMMS

agentName

SnmpAgent agentName

atomicTable

java.util.Hashtable atomicTable

api

SnmpAPI api

targetAddrExtTable

SnmpTargetAddrExtTable targetAddrExtTable

targetAddrTable

SnmpTargetAddrTable targetAddrTable

snmpTargetAddrExtEntryVector

java.util.Vector snmpTargetAddrExtEntryVector

xmlToVector

SnmpTargetAddrExtTableXMLToVector xmlToVector

format

java.lang.String format

fileDir

java.lang.String fileDir
Constructor Detail

SnmpTargetAddrExtTableRequestHandler

public SnmpTargetAddrExtTableRequestHandler(SnmpAgent agentRef)
Default constructor that takes the SnmpAgent as the argument.
Parameters:
agentRef - instance of SnmpAgent

SnmpTargetAddrExtTableRequestHandler

public SnmpTargetAddrExtTableRequestHandler(SnmpAgent agentRef,
                                            java.lang.String dirStr,
                                            java.lang.String fileName,
                                            java.lang.String format)
Secondary constructor with Persistence support.
Parameters:
agentRef - instance of SnmpAgent.
dirStr - the directory location String of the File.
fileName - the fileName String.
format - the Format of Storage.("xml")
Method Detail

getSnmpTargetAddrExtTableOidRep

public static int[] getSnmpTargetAddrExtTableOidRep()
Gets the SnmpTargetAddrExtTable entry OID - int[] of {1,3,6,1,6,3,18,1,2,1}
Returns:
The registered Table Entry OID as an int array

getOidRep

public int[] getOidRep()
Description copied from class: SimpleRequestHandler
Retrives the integer representation of OID
Overrides:
getOidRep in class SimpleRequestHandler
Tags copied from class: SimpleRequestHandler
Returns:
the integer array of OID

getSubidList

protected int[] getSubidList()
Description copied from class: SimpleRequestHandler
Gets the subid list of the oid.
Overrides:
getSubidList in class SimpleRequestHandler
Tags copied from class: SimpleRequestHandler
Returns:
the integer array of subid list

processGetRequest

protected void processGetRequest(SnmpVarBind varb,
                                 AgentNode node,
                                 VarBindRequestEvent pe)
                          throws AgentSnmpException
Description copied from class: SimpleRequestHandler
Process the Get Request message which is received from PduRequestHandler.
Overrides:
processGetRequest in class SimpleRequestHandler
Tags copied from class: SimpleRequestHandler
Parameters:
varb - The received varbind .
node - The node for which Get Request is to be done.
pe - The VarBind Request Event created by this Get request.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown while Processing the Event.

processGetRequest

protected void processGetRequest(SnmpVarBind varb,
                                 int req,
                                 VarBindRequestEvent pe,
                                 SnmpTargetAddrExtEntry entry,
                                 byte[] targetAddrName)
                          throws AgentSnmpException

processSetRequest

protected void processSetRequest(SnmpVarBind varb,
                                 AgentNode node,
                                 VarBindRequestEvent pe)
                          throws AgentSnmpException
Description copied from class: SimpleRequestHandler
Process the Set Request message which is received from PduRequestHandler.
Overrides:
processSetRequest in class SimpleRequestHandler
Tags copied from class: SimpleRequestHandler
Parameters:
varb - The received varbind.
node - The node for which Get Next Request is to be done.
pe - The VarBind Request Event created by this GetNext request.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown while Processing the Event.

processGetNextRequest

protected void processGetNextRequest(SnmpVarBind varb,
                                     AgentNode node,
                                     VarBindRequestEvent pe)
                              throws AgentSnmpException
Description copied from class: SimpleRequestHandler
Process the GetNext Request message which is received from PduRequestHandler.
Overrides:
processGetNextRequest in class SimpleRequestHandler
Tags copied from class: SimpleRequestHandler
Parameters:
varb - The received varbind.
node - The node for which Get Next Request is to be done.
pe - The VarBind Request Event created by this GetNext request.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown while Processing the Event.

createAndAddSnmpTargetAddrExtEntry

public boolean createAndAddSnmpTargetAddrExtEntry(java.lang.String targetAddrName,
                                                  java.lang.Integer targetAddrMMS,
                                                  java.lang.String targetAddrTMask)
The method to create and Add a new Entry to the TargetAddrExtTable.
Parameters:
targetAddrName - The targetAddrName with which the entry is to be created.
targetAddrMMS - The targetAddrMMS with which the entry is to be created.
targetAddrTMask - The targetAddrTMask with which the entry is to be created.
Returns:
boolean specifying whether the Entry is successfully added.
See Also:
createSnmpTargetAddrExtEntry.

createSnmpTargetAddrExtEntry

public SnmpTargetAddrExtEntry createSnmpTargetAddrExtEntry(java.lang.String targetAddrName,
                                                           java.lang.Integer targetAddrMMS,
                                                           java.lang.String targetAddrTMask)
The method to create a new SnmpTargetAddrEntry.
Parameters:
targetAddrName - The targetAddrName with which the entry is to be created.
targetAddrMMS - The targetAddrMMS with which the entry is to be created.
targetAddrTMask - The targetAddrTMask with which the entry is to be created.
Returns:
SnmpTargetAddrExtEntry object created.
See Also:
createAndAddSnmpTargetAddrExtEntry.

setTableVector

public void setTableVector(java.util.Vector targetAddrExtVec)
The method to set the Vector of SnmpTargetAddrExtEntries.
Parameters:
The - Vector of SnmpTargetAddrExtEntries.

getTableVector

public java.util.Vector getTableVector()
The method to get the Vector of SnmpTargetAddrEntries present in the SnmpTargetAddrTable.
Returns:
The Vector of SnmpTargetAddrEntries.

serialize

public void serialize(java.io.ObjectOutputStream outMain)
For serializing object
Parameters:
outMain - the ObjectOutputStream for serializing.