The SnmpV2or3Trap class sends a trap to an SNMP V2 or V3 agent.
Constructor
var trap = new SnmpV2or3Trap();
Properties
Name | Type | Description |
trapOID | String | Describes the event being reported. |
Methods
Return Value | Name | Description |
void | addInteger( String oid , int value ) | Adds an oid:integer pair to this trap. |
void | addOid( String oid ) | Adds an oid:null value pair to this trap. |
void | addString( String oid , String value ) | Adds an oid:string pair to this trap. |
void | destroy() | Frees up any resources used by this trap request. |
boolean | isDestroyed() | Returns true if this trap has been destroyed. |
boolean | send( SnmpContext context ) | Sends this trap to the specified SNMP context. |
Sample usage
var trap = new SnmpV2or3Trap(); trap.trapOID = ‘1.3.6.1.4.1.10734.3.4.3.0.1’; trap.addInteger( ‘1.3.6.1.4.1.10734.3.4.3.1.1’, 101 ); trap.send( context );