When I try to send an Alarm Trap or an Alarm clear trap from my MIB, I call the following code
if (vbs.length < 1)
{
throw new IllegalArgumentException("Too few notification objects (P6500WAlarmClear): " +
vbs.length + "<1");
}
// P6500WTrap
if (!(vbs[0].getOid().startsWith(oidTrapVarP6500WTrap)))
{
throw new IllegalArgumentException("Variable 0 (P6500WTrap)) has wrong OID: " + vbs[0].getOid()
+ " does not start with " + oidTrapVarP6500WTrap);
}
notificationOriginator.notify(context, oidP6500WAlarmClear, vbs);