|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
|
+--com.adventnet.snmp.snmp2.agent.BaseTrapForwardingTable
Handles all the requests for the trapForwardingTable. This will be instantiated if this Table needs RemoteConfiguration.
Both SimpleTrapForwardingTable and MicroTrapForwardingTable
extend this class.
SimpleTrapForwardingTable,
MicroTrapForwardingTable| Field Summary | |
(package private) static int |
COLUMNCOUNT
|
(package private) static int |
COMMUNITY
|
(package private) BaseForwardingTable |
forwardingTable
|
(package private) int[] |
forwardingTableOidRep
|
(package private) static int |
MANAGERHOST
|
(package private) static int |
MANAGERHOSTTYPE
|
(package private) static int |
MANAGERPORT
|
(package private) static int |
RETRIES
|
(package private) static int |
ROWSTATUS
|
(package private) static int |
TIMEOUT
|
(package private) AgentTableModel |
tModelComplete
|
(package private) static int |
VERSION
|
| Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler |
instrumentHandler,
listener,
tableListener,
writeEachTime |
| Constructor Summary | |
BaseTrapForwardingTable()
Primary Constructor |
|
BaseTrapForwardingTable(BaseForwardingTable forTable)
Constructor with the BaseForwardingTable reference. |
|
| Method Summary | |
(package private) boolean |
checkForRowStatus(ForwardingEntry entry)
|
static ForwardingEntry |
createForwardingEntry(java.lang.Integer managerHostType,
java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries)
Creates a ForwardingEntry object for the V1V2ForwardingTable with RowStatus Value as Active. |
static ForwardingEntry |
createForwardingEntry(java.lang.Integer managerHostType,
java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries,
java.lang.Integer status)
Creates a ForwardingEntry object for the V1V2ForwardingTable. |
static ForwardingEntry |
createForwardingEntry(java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries)
Deprecated. - make use of the method with extra argument as the index has been changed. Creates a ForwardingEntry object for the V1V2ForwardingTable with RowStatus Value as Active. |
static ForwardingEntry |
createForwardingEntry(java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries,
java.lang.Integer status)
Deprecated. - make use of the method with extra argument as the index has been changed. Creates a ForwardingEntry object for the V1V2ForwardingTable. |
ForwardingEntry |
getForwardingEntry(int index)
Gets the Entry at the given index. |
int |
getNumRows()
Gets the number of rows of a table. |
int[] |
getOidRep()
This method returns the OID representation of the Entry node of the TrapForwardingTable |
protected int[] |
getSubidList()
This method returns the subId list of the columns in the TrapForwardingTable |
java.util.Vector |
getTableVector()
Deprecated. use the method in BaseForwardingTable. Getter of the Table Vector of the BaseTrapForwardingTable |
java.lang.String |
getV1v2ManagerHost(int index)
Gets the manager host name to which we need to send the Traps. |
int |
getV1v2ManagerPort(int index)
The manager port to which we need to send the Traps to |
int |
getV1v2ManagerStatus(int index)
Gets the row status of the table. |
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,
ForwardingEntry 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 |
(package private) void |
setOidRep(int[] oidRep)
|
void |
setTableVector(java.util.Vector tableVector)
Deprecated. use the method in BaseForwardingTable. Setter for the Table Vector of the BaseTrapForwardingTable |
| 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 |
|
| Field Detail |
static final int MANAGERHOSTTYPE
static final int MANAGERHOST
static final int MANAGERPORT
static final int VERSION
static final int COMMUNITY
static final int TIMEOUT
static final int RETRIES
static final int ROWSTATUS
static final int COLUMNCOUNT
int[] forwardingTableOidRep
BaseForwardingTable forwardingTable
AgentTableModel tModelComplete
| Constructor Detail |
public BaseTrapForwardingTable()
public BaseTrapForwardingTable(BaseForwardingTable forTable)
forTable - the BaseForwardingTable instance.| Method Detail |
public int[] getOidRep()
void setOidRep(int[] oidRep)
protected int[] getSubidList()
public void setTableVector(java.util.Vector tableVector)
tableVector - a Vector of ForwardingEntry objects sorted according to the instancegetTableVector()public java.util.Vector getTableVector()
setTableVector(Vector tableVector)
public static ForwardingEntry createForwardingEntry(java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries)
managerHost - The IpAddress String specifying the HostName of the
Manager to which the Notification or Trap is to be forwarded.
- default value 127.0.0.lmanagerPort - The Integer specifying Manager's Port to which the
Notification or Trap is to be forwarded - default value 8003version - The Integer specifying Snmp Version with which the TrapPDU
is to be sent - default value is 2 (v2c)community - The String specifying community of the TrapPDU that
is to be sent - default value is publictimeout - The Long value specifying the TrapPDU's Timeout value
- default value is 5000retiries - The Long value specifying the TrapPDU's retries count
- default value is 0
public static ForwardingEntry createForwardingEntry(java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries,
java.lang.Integer status)
managerHost - The IpAddress String specifying the HostName of the
Manager to which the Notification or Trap is to be forwarded.
- default value 127.0.0.lmanagerPort - The Integer specifying Manager's Port to which the
Notification or Trap is to be forwarded - default value 8003version - The Integer specifying Snmp Version with which the TrapPDU
is to be sent - default value is 2 (v2c)community - The String specifying community of the TrapPDU that
is to be sent - default value is publictimeout - The Long value specifying the TrapPDU's Timeout value
- default value is 5000retiries - The Long value specifying the TrapPDU's retries count
- default value is 0status - The Integer value specifying the RowStatus value(1 - 5) - default value is 1
protected java.util.Vector processReadRequest(VarBindRequestEvent pe,
ForwardingEntry 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)
varbinds - 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)
varbinds - 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)
varbinds - 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(ForwardingEntry entry)
throws AgentSnmpException
public int getNumRows()
public java.lang.String getV1v2ManagerHost(int index)
public int getV1v2ManagerPort(int index)
row - index
Note: if a -1 is returned
port is assumed to be 162public int getV1v2ManagerStatus(int index)
public ForwardingEntry getForwardingEntry(int index)
index - the index for which the Entry is required.
public static ForwardingEntry createForwardingEntry(java.lang.Integer managerHostType,
java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries)
managerHostType - the type of the IPAddress of the Manager with which the Entry is to be createdmanagerHost - The IpAddress String specifying the HostName of the
Manager to which the Notification or Trap is to be forwarded.
- default value 127.0.0.lmanagerPort - The Integer specifying Manager's Port to which the
Notification or Trap is to be forwarded - default value 8003version - The Integer specifying Snmp Version with which the TrapPDU
is to be sent - default value is 2 (v2c)community - The String specifying community of the TrapPDU that
is to be sent - default value is publictimeout - The Long value specifying the TrapPDU's Timeout value
- default value is 5000retiries - The Long value specifying the TrapPDU's retries count
- default value is 0
public static ForwardingEntry createForwardingEntry(java.lang.Integer managerHostType,
java.lang.String managerHost,
java.lang.Integer managerPort,
java.lang.Integer version,
java.lang.String community,
java.lang.Long timeout,
java.lang.Long retries,
java.lang.Integer status)
managerHostType - the type of the IPAddress of the Manager with which the Entry is to be createdmanagerHost - The IpAddress String specifying the HostName of the
Manager to which the Notification or Trap is to be forwarded.
- default value 127.0.0.lmanagerPort - The Integer specifying Manager's Port to which the
Notification or Trap is to be forwarded - default value 8003version - The Integer specifying Snmp Version with which the TrapPDU
is to be sent - default value is 2 (v2c)community - The String specifying community of the TrapPDU that
is to be sent - default value is publictimeout - The Long value specifying the TrapPDU's Timeout value
- default value is 5000retiries - The Long value specifying the TrapPDU's retries count
- default value is 0status - The Integer value specifying the RowStatus value(1 - 5) - default value is 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||