org.jboss.jmx.adaptor.snmp.agent
Class TrapEmitter

java.lang.Object
  extended byorg.jboss.jmx.adaptor.snmp.agent.TrapEmitter

public class TrapEmitter
extends java.lang.Object

TrapEmitter is a class that manages SNMP trap emission. Currently, it allows to send V1 or V2 traps to one or more subscribed SNMP managers defined by their IP address, listening port number and expected SNMP version.


Constructor Summary
TrapEmitter(java.lang.String trapFactoryClassName, Counter (src)  trapCount, Clock (src)  uptime, java.lang.String managersResName, java.lang.String notificationMapResName)
          Builds a TrapEmitter object for sending SNMP V1 or V2 traps.
 
Method Summary
 void send(Notification (src)  n)
          Intercepts the notification and after translating it to a trap sends it along.
 void start()
          Complete emitter initialisation
 void stop()
          Perform shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrapEmitter

public TrapEmitter(java.lang.String trapFactoryClassName,
                   Counter (src)  trapCount,
                   Clock (src)  uptime,
                   java.lang.String managersResName,
                   java.lang.String notificationMapResName)
Builds a TrapEmitter object for sending SNMP V1 or V2 traps.

Method Detail

start

public void start()
           throws java.lang.Exception
Complete emitter initialisation

Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Perform shutdown

Throws:
java.lang.Exception

send

public void send(Notification (src)  n)
          throws java.lang.Exception
Intercepts the notification and after translating it to a trap sends it along.

Parameters:
n - notification to be sent
Throws:
java.lang.Exception - if an error occurs during the preparation or sending of the trap