|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.agent.Cache
com.adventnet.snmp.snmp2.agent.BaseSnmpStore
com.adventnet.snmp.snmp2.agent.BaseSnmpTrapService
com.adventnet.snmp.snmp2.agent.SnmpTrapService
com.adventnet.snmp.mibs.agent.SnmpMibTrapService
public class SnmpMibTrapService
Used to send SNMP V1 & SNMP V2c Traps. Provides MIB support for traps by looking up for node Labels argument. It will convert into corresponding SnmpVarBind and SnmpOID by using the MibOperations instance.
AgentMibOperations, MibOperations , TrapRequestEvent,
Serialized Form| Field Summary | |
|---|---|
(package private) java.lang.String |
mibModules
|
| Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpTrapService |
|---|
isInformRequest |
| Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore |
|---|
debugLevel, protocol, session |
| Constructor Summary | |
|---|---|
SnmpMibTrapService()
No Arg constructor creates a MibOperations reference if the Cache doesnt have one |
|
SnmpMibTrapService(com.adventnet.snmp.mibs.AgentMibOperations mibOperations)
constructor with param MibOperations |
|
| Method Summary | |
|---|---|
MibModule |
addMib(java.lang.String mibFile)
adds the Mib to the list of modules already loaded |
void |
addTrapRequest(TrapRequestEvent te)
This is the listener method for TrapRequestEvents Source beans would call this method when they need to issue Traps |
java.lang.String |
getMibModules()
Get the MIBs loaded in this applet/application |
(package private) SnmpVarBind |
getVarBind(OidandValue oidValue)
adds the varbind with specified oid, type and value to the pdu |
int |
getVersion()
get the Snmp Version |
static void |
main(java.lang.String[] args)
It can also used as a stand-alone application |
void |
sendTrap(java.lang.String managerNode,
int managerPort,
SnmpOID enterpriseOID,
java.lang.String community,
int trapIndex,
long timeticks,
java.util.Vector varbindings)
Used by SnmpAgent to send SNMPV1 & SNMPV2 traps |
void |
sendTrap(java.lang.String managerNode,
int managerPort,
java.lang.String enterprise,
java.lang.String community,
int trapIndex,
long timeticks,
OidandValue[] varbindings)
Using the AgentMibOperations instance this method resolves the enterprise & OidandValue into corresponding SnmpOID and SnmpVarBind variables. |
void |
setMibModules(java.lang.String mibFiles)
parse the MibFiles in this application and setupAgent clauses |
void |
setMibOperations(com.adventnet.snmp.mibs.AgentMibOperations mibOps)
Setter for MibOperations which loads the MIB etc Note that the MibOperations are shared |
void |
setVersion(int snmpVersion)
sets the Snmp version |
(package private) void |
updateMibs(java.lang.String mibModules)
|
| Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseSnmpStore |
|---|
closeAll, finalize, getSnmpAPI, getSnmpSession, getSnmpSession, initSession, initSnmpStore, isAlive, isDebug, killSnmpAgent |
| Methods inherited from class com.adventnet.snmp.snmp2.agent.Cache |
|---|
getFromCache, getMibOperations, putInCache, setMibOperations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
java.lang.String mibModules
| Constructor Detail |
|---|
public SnmpMibTrapService(com.adventnet.snmp.mibs.AgentMibOperations mibOperations)
public SnmpMibTrapService()
| Method Detail |
|---|
public void setMibOperations(com.adventnet.snmp.mibs.AgentMibOperations mibOps)
public static void main(java.lang.String[] args)
usage: SnmpTrap [-d] [-M managerNode] [-m MIB_file] [-m2 Second_MIB_file] [-p port] [-t timeticks]
public void sendTrap(java.lang.String managerNode,
int managerPort,
SnmpOID enterpriseOID,
java.lang.String community,
int trapIndex,
long timeticks,
java.util.Vector varbindings)
enterpriseOID - enterprise-oid (in OID format )varbindings - Vector of type Snmp.SnmpVarBindSnmpVarBind
public void sendTrap(java.lang.String managerNode,
int managerPort,
java.lang.String enterprise,
java.lang.String community,
int trapIndex,
long timeticks,
OidandValue[] varbindings)
enterprise - enterprise-oid(in string)varbindings - Vector in OidandValueOidandValuepublic void setVersion(int snmpVersion)
setVersion in class BaseSnmpTrapServiceSnmpAPI - version constantpublic int getVersion()
getVersion in class BaseSnmpTrapServiceversion constans like SnmpAPI.SNMP_VERSION_1 etc..SnmpVarBind getVarBind(OidandValue oidValue)
public void addTrapRequest(TrapRequestEvent te)
addTrapRequest in interface TrapRequestListeneraddTrapRequest in class SnmpTrapServicete - the trap eventTrapRequestEventpublic void setMibModules(java.lang.String mibFiles)
a - white-space separated list of mib filespublic java.lang.String getMibModules()
void updateMibs(java.lang.String mibModules)
public MibModule addMib(java.lang.String mibFile)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||