|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.jmx.adaptor.snmp.trapd.TrapdService
public class TrapdService
MBean wrapper class that acts as an SNMP trap receiver/logger. It logs traps as INFO messages - change log4j configuration to redirect logging output. To reconfigure the listening port the MBean needs to be stopped and re-started.
Field Summary | |
---|---|
protected org.opennms.protocols.snmp.SnmpTrapSession |
trapSession
The snmp session used to receive the traps |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
---|---|
TrapdService()
Empty CTOR |
Method Summary | |
---|---|
String |
getBindAddress()
Gets the interface that will be bound |
int |
getPort()
Gets the port that will be used to receive traps |
void |
setBindAddress(String host)
Sets the interface that will be bound |
void |
setPort(int port)
Sets the port that will be used to receive traps |
protected void |
startService()
Performs service start-up by instantiating an SnmpTrapSession |
protected void |
stopService()
Performs service shutdown by stopping SnmpTrapSession |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
---|
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Field Detail |
---|
protected org.opennms.protocols.snmp.SnmpTrapSession trapSession
Constructor Detail |
---|
public TrapdService()
Method Detail |
---|
public void setPort(int port)
setPort
in interface TrapdServiceMBean
port
- the port to listen for trapspublic int getPort()
getPort
in interface TrapdServiceMBean
public void setBindAddress(String host) throws UnknownHostException
setBindAddress
in interface TrapdServiceMBean
host
- the interface to bind
UnknownHostException
public String getBindAddress()
getBindAddress
in interface TrapdServiceMBean
protected void startService() throws Exception
startService
in class org.jboss.system.ServiceMBeanSupport
Exception
protected void stopService() throws Exception
stopService
in class org.jboss.system.ServiceMBeanSupport
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |