com.adventnet.snmp.snmp2.agent.notification
Class SnmpNotifyTableRequestHandler

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
        |
        +--com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
              |
              +--com.adventnet.snmp.snmp2.agent.notification.SnmpNotifyTableRequestHandler

public class SnmpNotifyTableRequestHandler
extends BaseTableRequestHandler

Handles all requests under snmpNotifyTable group.


Field Summary
(package private)  SnmpAgent agentName
           
(package private)  SnmpAPI api
           
(package private) static int COLUMNCOUNT
           
(package private)  java.lang.String fileDir
           
(package private)  java.lang.String format
           
(package private)  SnmpNotifyTable notifyTable
           
(package private)  java.util.Vector snmpNotifyEntryVector
           
(package private) static int SNMPNOTIFYNAME
           
(package private) static int SNMPNOTIFYROWSTATUS
           
(package private) static int SNMPNOTIFYSTORAGETYPE
           
(package private) static int SNMPNOTIFYTAG
           
(package private) static int SNMPNOTIFYTYPE
           
(package private)  SnmpNotifyTableXMLToVector xmlToVector
           
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
agentName, listenerList, tModelComplete
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
instrumentHandler, listener, tableListener, writeEachTime
 
Constructor Summary
SnmpNotifyTableRequestHandler(SnmpAgent agentRef)
          The Primary Constructor for the SnmpNotifyRequestHandler.
SnmpNotifyTableRequestHandler(SnmpAgent agentRef, java.lang.String dirStr, java.lang.String fileName, java.lang.String format)
          The Secondary Constructor with the agent Name and Persistence Support.
 
Method Summary
(package private)  boolean checkForRowStatus(SnmpNotifyEntry entry)
           
 boolean createAndAddSnmpNotifyEntry(java.lang.String notifyName, java.lang.String notifyTag, java.lang.Integer notifyType, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The Method to Create and Add a new SnmpNotifyEntry to SnmpNotifyTable.
static SnmpNotifyEntry createSnmpNotifyEntry(java.lang.String notifyName, java.lang.String notifyTag, java.lang.Integer notifyType, java.lang.Integer storageType, java.lang.Integer rowStatus)
          The Static Method to create a SnmpNotifyEntry.
 int[] getOidRep()
          Retrives the integer representation of OID
static int[] getSnmpNotifyTableOidRep()
          Getter for the Snmp Notify Table OID Representation.
protected  int[] getSubidList()
          Gets the subid list of the oid.
 java.util.Vector getTableVector()
          The method to return the Vector of VacmContextEntries present in the VacmContextTable.
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, SnmpNotifyEntry entry, byte[] notifyName)
          Process the Get Request message for the given params.
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)
          This method Serializes the Output Stream.
 void setTableVector(java.util.Vector notifyVec)
          The method to set the Vector of VacmContextEntries.
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseTableRequestHandler
addChangeListener, createChangeEvent, fireChangeEvent, removeChangeListener
 
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

SNMPNOTIFYNAME

static final int SNMPNOTIFYNAME

SNMPNOTIFYTAG

static final int SNMPNOTIFYTAG

SNMPNOTIFYTYPE

static final int SNMPNOTIFYTYPE

SNMPNOTIFYSTORAGETYPE

static final int SNMPNOTIFYSTORAGETYPE

SNMPNOTIFYROWSTATUS

static final int SNMPNOTIFYROWSTATUS

COLUMNCOUNT

static final int COLUMNCOUNT

agentName

SnmpAgent agentName

api

SnmpAPI api

notifyTable

SnmpNotifyTable notifyTable

snmpNotifyEntryVector

java.util.Vector snmpNotifyEntryVector

xmlToVector

SnmpNotifyTableXMLToVector xmlToVector

format

java.lang.String format

fileDir

java.lang.String fileDir
Constructor Detail

SnmpNotifyTableRequestHandler

public SnmpNotifyTableRequestHandler(SnmpAgent agentRef)
The Primary Constructor for the SnmpNotifyRequestHandler.
Parameters:
agentRef - The Reference Agent Name.

SnmpNotifyTableRequestHandler

public SnmpNotifyTableRequestHandler(SnmpAgent agentRef,
                                     java.lang.String dirStr,
                                     java.lang.String fileName,
                                     java.lang.String format)
The Secondary Constructor with the agent Name and Persistence Support.
Parameters:
agentRef - The Agent Reference.
dirStr - the directory location String of the File.
fileName - The fileName String.
format - The file format("xml").
Method Detail

getSnmpNotifyTableOidRep

public static int[] getSnmpNotifyTableOidRep()
Getter for the Snmp Notify Table OID Representation.
Returns:
The OID Representation Required.

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,
                                 SnmpNotifyEntry entry,
                                 byte[] notifyName)
                          throws AgentSnmpException
Process the Get Request message for the given params.
Parameters:
varb - The received VarBind.
req - The request given.
pe - The Varbind Request Event created after thid Event.
entry - The Snmp Notify Entry for the Request.
notifyName - The Notify name of the Notify Table.
Throws:
AgentSnmpException - This wraps all the Exceptions thrown by the Agent while Processing this event.

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.

checkForRowStatus

boolean checkForRowStatus(SnmpNotifyEntry entry)
                    throws AgentException

createAndAddSnmpNotifyEntry

public boolean createAndAddSnmpNotifyEntry(java.lang.String notifyName,
                                           java.lang.String notifyTag,
                                           java.lang.Integer notifyType,
                                           java.lang.Integer storageType,
                                           java.lang.Integer rowStatus)
The Method to Create and Add a new SnmpNotifyEntry to SnmpNotifyTable.
Parameters:
notifyName - The notifyName with which the entry is to be created.
notifyTag - The notifyTag with which the entry is to be created.
notifyType - The notifyType with which the entry is to be created.
storageType - The storageType for the Entry.
rowStatus - the RowStatus Integer for the Entry.
Returns:
the boolean specifying whether the row is added Successfylly or Not.
See Also:
createSnmpNotifyEntry.

createSnmpNotifyEntry

public static SnmpNotifyEntry createSnmpNotifyEntry(java.lang.String notifyName,
                                                    java.lang.String notifyTag,
                                                    java.lang.Integer notifyType,
                                                    java.lang.Integer storageType,
                                                    java.lang.Integer rowStatus)
The Static Method to create a SnmpNotifyEntry.
Parameters:
notifyName - The notifyName with which the entry is to be created.
notifyTag - The notifyTag with which the entry is to be created.
notifyType - The notifyType with which the entry is to be created.
storageType - The storageType for the Entry.
rowStatus - the RowStatus Integer for the Entry.
Returns:
The created SnmpNotifyEntry Object.
See Also:
createAndAddSnmpNotifyEntry.

setTableVector

public void setTableVector(java.util.Vector notifyVec)
The method to set the Vector of VacmContextEntries.
Overrides:
setTableVector in class BaseTableRequestHandler
Parameters:
The - Vector of VacmContextEntries.

getTableVector

public java.util.Vector getTableVector()
The method to return the Vector of VacmContextEntries present in the VacmContextTable.
Overrides:
getTableVector in class BaseTableRequestHandler
Returns:
The Vector of VacmContextEntries.

serialize

public void serialize(java.io.ObjectOutputStream outMain)
This method Serializes the Output Stream.
Parameters:
outMain - The objet Output stream to be serialized.