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

java.lang.Object
  extended by org.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.

Version:
$Revision: 110496 $
Author:
Spyros Pollatos, Dimitris Andreadis

Constructor Summary
TrapEmitter(SnmpAgentService snmpAgentService)
          Builds a TrapEmitter object for sending SNMP V1 or V2 traps.
 
Method Summary
 void addNotifications(java.util.List<Mapping> notifications)
           
 void removeNotifications(java.util.List<Mapping> notifications)
           
 void send(javax.management.Notification 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(SnmpAgentService snmpAgentService)
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(javax.management.Notification 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

addNotifications

public void addNotifications(java.util.List<Mapping> notifications)

removeNotifications

public void removeNotifications(java.util.List<Mapping> notifications)


Copyright © 2011. All Rights Reserved.