|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.agent.SimpleRequestHandler
com.adventnet.snmp.snmp2.agent.TrapTableRequestHandler
public class TrapTableRequestHandler
Handles all requests under trapTable group
| Field Summary | |
|---|---|
(package private) static int |
AGENTCOMMUNITY
|
(package private) static int |
AGENTHOST
|
(package private) static int |
AGENTHOSTTYPE
|
(package private) SnmpAgent |
agentName
|
(package private) static int |
AGENTSTATUS
|
(package private) static int |
AGENTTRAPPORTNUMBER
|
(package private) static int |
COLUMNCOUNT
|
(package private) AgentTableModel |
tModelComplete
|
| Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler |
|---|
instrumentHandler, listener, tableListener, writeEachTime |
| Constructor Summary | |
|---|---|
TrapTableRequestHandler(SnmpAgent agentRef)
Default constructor that takes the SnmpAgent as the argument. |
|
TrapTableRequestHandler(SnmpAgent agentRef,
java.lang.String dir,
java.lang.String fileName,
boolean fToVPersistence)
Constructor that takes the SnmpAgent as the argument and persistence properties. |
|
| Method Summary | |
|---|---|
(package private) boolean |
checkForRowStatus(TrapEntry entry)
|
void |
createAndAddTrapFilteringEntry(java.lang.Integer hostType,
java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
To Create TrapEntry for the TrapFilteringTable with the corresponding values. |
void |
createAndAddTrapFilteringEntry(java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
Deprecated. - make use of the method with extra argument as the index has been changed. To Create TrapEntry for the TrapFilteringTable with the corresponding values. |
void |
createAndAddTrapFilteringEntry(java.lang.String host,
int port,
java.lang.String community)
Deprecated. use the other method To Create TrapEntry for the TrapFilteringTable with the corresponding values. |
static TrapEntry |
createTrapFilteringEntry(java.lang.Integer hostType,
java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
To Create TrapEntry for the TrapFilteringTable with the corresponding values. |
static TrapEntry |
createTrapFilteringEntry(java.lang.Integer hostType,
java.lang.String host,
int port,
java.lang.String community)
To Create TrapEntry for the TrapFilteringTable with the corresponding values with the RowStatus value as Active(1). |
static TrapEntry |
createTrapFilteringEntry(java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
Deprecated. - make use of the method with extra argument as the index has been changed. To Create TrapEntry for the TrapFilteringTable with the corresponding values. |
static TrapEntry |
createTrapFilteringEntry(java.lang.String host,
int port,
java.lang.String community)
Deprecated. - make use of the method with extra argument as the index has been changed. To Create TrapEntry for the TrapFilteringTable with the corresponding values with the RowStatus value as Active(1). |
AgentTableModel |
getAgentTableModel()
Getter for the Table Model which maintains the Table Entries |
static java.util.Hashtable |
getMibVarHash()
Deprecated. - use getObjectHash() for getting the details of Sub-Ids Method to retrun the HashTable of MibVars. |
java.util.Hashtable |
getObjectHash()
Same as method getMibVarHash, but non-static.Duplicated to have backward compatibility Method to retrun the HashTable of AttributeName - SubId pairs |
int[] |
getOidRep()
Retrives the integer representation of OID |
protected int[] |
getSubidList()
Gets the subid list of the oid. |
java.util.Vector |
getTableVector()
Getter for Table Entries Vector |
TrapEntry |
getTrapEntryInstance()
Method to get the New TrapEntry instance. |
static int[] |
getTrapTableOidRep()
Gets the TrapTable entry OID - int[] of {1,3,6,1,4,1,2162,10,3,1,2,3,5,1} |
(package private) void |
initTableVector()
|
protected void |
processGetNextRequest(java.util.Vector varbinds,
java.util.Vector nodes,
VarBindRequestEvent pe)
This method is used for processing the incoming GETNEXT Requests |
protected void |
processGetRequest(java.util.Vector varbinds,
java.util.Vector nodes,
VarBindRequestEvent pe)
This method along with processReadRequest is used for processing the GET Requests |
protected java.util.Vector |
processReadRequest(VarBindRequestEvent pe,
TrapEntry entry,
java.util.Vector attributesList,
java.util.Hashtable varbindIndexHash)
This method along with processGetRequest, will be used for processing the incoming GET Requests |
protected void |
processSetRequest(java.util.Vector varbinds,
java.util.Vector nodes,
VarBindRequestEvent pe)
This method along with processWriteRequest is used for processing the incoming SET Requests |
java.util.Vector |
processWriteRequest(java.lang.String instanceString,
java.util.Vector list,
VarBindRequestEvent pe,
java.util.Hashtable varbindIndexHash)
This method along with the ProcessSetRequest is used for processing the Incoming Set Requests |
void |
setTableVector(java.util.Vector tableVector)
Setter for the Table Entries for sysORTable |
| Methods inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler |
|---|
addInstrumentHandler, addRegistrationListener, addTableListener, addUpdateListener, getInstrument, getNextRequest, getNextRequest, getObjectTypeHash, getRequest, getTableListener, getUpdateListener, 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 |
|---|
static final int AGENTHOSTTYPE
static final int AGENTHOST
static final int AGENTTRAPPORTNUMBER
static final int AGENTCOMMUNITY
static final int AGENTSTATUS
static final int COLUMNCOUNT
SnmpAgent agentName
AgentTableModel tModelComplete
| Constructor Detail |
|---|
public TrapTableRequestHandler(SnmpAgent agentRef)
agentRef - instance of SnmpAgent
public TrapTableRequestHandler(SnmpAgent agentRef,
java.lang.String dir,
java.lang.String fileName,
boolean fToVPersistence)
agentRef - instance of SnmpAgentdir - the directory location String of the File.fileName - the fileName String.fToVPersistence - the boolean true for TextFile storage false
for a XML format.| Method Detail |
|---|
public static int[] getTrapTableOidRep()
public int[] getOidRep()
SimpleRequestHandler
getOidRep in class SimpleRequestHandlerprotected int[] getSubidList()
SimpleRequestHandler
getSubidList in class SimpleRequestHandlerpublic static java.util.Hashtable getMibVarHash()
public java.util.Hashtable getObjectHash()
getObjectHash in class SimpleRequestHandler
protected java.util.Vector processReadRequest(VarBindRequestEvent pe,
TrapEntry entry,
java.util.Vector attributesList,
java.util.Hashtable varbindIndexHash)
pe - VarbindRequestEvententry - Entry Object, which contains getter/setter methods for the attributes in this Table GroupattributesList - List of SnmpVarbinds of Attributes for which GET Request is to be perfortmedvarbindIndexHash - Hashtable for storing the index of the incoming varbinds
public java.util.Vector processWriteRequest(java.lang.String instanceString,
java.util.Vector list,
VarBindRequestEvent pe,
java.util.Hashtable varbindIndexHash)
instanceString - Index of the row in which SET Request is to be performedlist - List of SnmpVarbinds of Attributes for which SET is performedpe - VarbindRequest EventvarbindIndexHash - Hashtable for storing the index of the incoming varbinds
protected void processGetRequest(java.util.Vector varbinds,
java.util.Vector nodes,
VarBindRequestEvent pe)
processGetRequest in class SimpleRequestHandlervarbinds - List of SnmpVarbinds for which GET Request is to be performednodes - List of Agent Nodes for which GET Request is performedpe - VarbindRequest Event
protected void processSetRequest(java.util.Vector varbinds,
java.util.Vector nodes,
VarBindRequestEvent pe)
processSetRequest in class SimpleRequestHandlervarbinds - List of SnmpVarbinds for which SET Request is performednodes - List of Agent Nodes for which SET Request is performedpe - VarbindRequest Event
protected void processGetNextRequest(java.util.Vector varbinds,
java.util.Vector nodes,
VarBindRequestEvent pe)
processGetNextRequest in class SimpleRequestHandlervarbinds - List of varbinds for which the GETNEXT Request is to be performednodes - List of AgentNodes for which GETNEXT Request is to be performedpe - VarbindRequest Event
boolean checkForRowStatus(TrapEntry entry)
throws AgentException
AgentExceptionpublic TrapEntry getTrapEntryInstance()
public void setTableVector(java.util.Vector tableVector)
tableVector - The Vector of SysOREntry objects.getTableVector()public AgentTableModel getAgentTableModel()
public java.util.Vector getTableVector()
setTableVector(Vector tableVector);void initTableVector()
public void createAndAddTrapFilteringEntry(java.lang.String host,
int port,
java.lang.String community)
host - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be created
public void createAndAddTrapFilteringEntry(java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
host - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be createdstatus - the RowStatus value (1 - 5) with which the Entry to be created
public void createAndAddTrapFilteringEntry(java.lang.Integer hostType,
java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
hostType - the type of the IPAddress of the host with which the Entry is to be createdhost - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be createdstatus - the RowStatus value (1 - 5) with which the Entry to be created
public static TrapEntry createTrapFilteringEntry(java.lang.String host,
int port,
java.lang.String community)
host - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be created
public static TrapEntry createTrapFilteringEntry(java.lang.Integer hostType,
java.lang.String host,
int port,
java.lang.String community)
hostType - the type of the IPAddress of the host with which the Entry is to be createdhost - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be created
public static TrapEntry createTrapFilteringEntry(java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
host - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be createdstatus - the RowStatus value (1 - 5) with which the Entry to be created
public static TrapEntry createTrapFilteringEntry(java.lang.Integer hostType,
java.lang.String host,
java.lang.Integer port,
java.lang.String community,
java.lang.Integer status)
hostType - the type of the IPAddress of the host with which the Entry is to be createdhost - the host with which the Entry is to be createdport - the port with which the Entry is to be createdcommunity - the community with which the Entry is to be createdstatus - the RowStatus value (1 - 5) with which the Entry to be created
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||