|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.daemon.AbstractServiceDaemon
org.opennms.netmgt.trapd.Trapd
public class Trapd
The Trapd listens for SNMP traps on the standard port(162). Creates a SnmpTrapSession and implements the SnmpTrapHandler to get callbacks when traps are received
The received traps are converted into XML and sent to eventd
Note: Trapd is a PausableFiber so as to receive control events. However, a 'pause' on Trapd has no impact on the receiving and processing of traps
| Field Summary |
|---|
| Fields inherited from interface org.opennms.core.fiber.PausableFiber |
|---|
PAUSE_PENDING, PAUSED, RESUME_PENDING |
| Fields inherited from interface org.opennms.core.fiber.Fiber |
|---|
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
| Constructor Summary | |
|---|---|
Trapd()
Constructs a new Trapd object that receives and forwards trap messages via JSDT. |
|
| Method Summary | |
|---|---|
TrapProcessor |
createTrapProcessor()
|
FifoQueue<TrapNotification> |
getBacklogQ()
|
BroadcastEventProcessor |
getEventReader()
|
org.opennms.netmgt.trapd.TrapQueueProcessor |
getProcessor()
|
int |
getSnmpTrapPort()
|
int |
getStatus()
Returns the current status of the service. |
TrapdIpMgr |
getTrapdIpMgr()
|
void |
onInit()
|
void |
onPause()
Pauses Trapd |
void |
onResume()
Resumes Trapd |
void |
onStart()
Create the SNMP trap session and create the communication channel to communicate with eventd. |
void |
onStop()
Stops the currently running service. |
void |
setBacklogQ(FifoQueue<TrapNotification> backlogQ)
|
void |
setEventReader(BroadcastEventProcessor eventReader)
|
void |
setProcessor(org.opennms.netmgt.trapd.TrapQueueProcessor processor)
|
void |
setSnmpTrapPort(int snmpTrapPort)
|
void |
setTrapdIpMgr(TrapdIpMgr trapdIpMgr)
|
void |
trapError(int error,
String msg)
|
void |
trapReceived(TrapNotification trapNotification)
|
| Methods inherited from class org.opennms.netmgt.daemon.AbstractServiceDaemon |
|---|
afterPropertiesSet, debugf, debugf, errorf, errorf, fatalf, fatalf, getName, getStatusText, infof, infof, init, isPaused, isRunning, isStarting, isStartPending, log, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus, warnf, warnf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opennms.core.fiber.PausableFiber |
|---|
pause, resume |
| Methods inherited from interface org.opennms.core.fiber.Fiber |
|---|
getName, start, stop |
| Methods inherited from interface org.springframework.beans.factory.InitializingBean |
|---|
afterPropertiesSet |
| Constructor Detail |
|---|
public Trapd()
Constructs a new Trapd object that receives and forwards trap messages via JSDT. The session is initialized with the default client name of OpenNMS.trapd. The trap session is started on the default port, as defined by the SNMP libarary.
SnmpTrapSession| Method Detail |
|---|
public TrapProcessor createTrapProcessor()
createTrapProcessor in interface TrapProcessorFactorypublic void trapReceived(TrapNotification trapNotification)
trapReceived in interface TrapNotificationListenerpublic void onInit()
onInit in class AbstractServiceDaemonpublic void onStart()
onStart in class AbstractServiceDaemonUndeclaredThrowableException - if an unexpected database, or IO exception occurs.SnmpTrapSession,
SnmpTrapHandlerpublic void onPause()
onPause in class AbstractServiceDaemonpublic void onResume()
onResume in class AbstractServiceDaemonpublic void onStop()
onStop in class AbstractServiceDaemonpublic int getStatus()
getStatus in interface FibergetStatus in class AbstractServiceDaemon
public void trapError(int error,
String msg)
trapError in interface TrapNotificationListenerpublic TrapdIpMgr getTrapdIpMgr()
public void setTrapdIpMgr(TrapdIpMgr trapdIpMgr)
public BroadcastEventProcessor getEventReader()
public void setEventReader(BroadcastEventProcessor eventReader)
public FifoQueue<TrapNotification> getBacklogQ()
public void setBacklogQ(FifoQueue<TrapNotification> backlogQ)
public org.opennms.netmgt.trapd.TrapQueueProcessor getProcessor()
public void setProcessor(org.opennms.netmgt.trapd.TrapQueueProcessor processor)
public int getSnmpTrapPort()
public void setSnmpTrapPort(int snmpTrapPort)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||