|
||||||||||
| 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.snmp4j.Snmp |
snmp
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 | |
|---|---|
java.lang.String |
getBindAddress()
Gets the interface that will be bound |
int |
getPort()
Gets the port that will be used to receive traps |
void |
processPdu(org.snmp4j.CommandResponderEvent e)
|
void |
setBindAddress(java.lang.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, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext |
| 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.snmp4j.Snmp snmp
| Constructor Detail |
|---|
public TrapdService()
| Method Detail |
|---|
public void setPort(int port)
setPort in interface TrapdServiceMBeanport - the port to listen for trapspublic int getPort()
getPort in interface TrapdServiceMBean
public void setBindAddress(java.lang.String host)
throws java.net.UnknownHostException
setBindAddress in interface TrapdServiceMBeanhost - the interface to bind
java.net.UnknownHostExceptionpublic java.lang.String getBindAddress()
getBindAddress in interface TrapdServiceMBean
protected void startService()
throws java.lang.Exception
startService in class org.jboss.system.ServiceMBeanSupportjava.lang.Exception
protected void stopService()
throws java.lang.Exception
stopService in class org.jboss.system.ServiceMBeanSupportjava.lang.Exceptionpublic void processPdu(org.snmp4j.CommandResponderEvent e)
processPdu in interface org.snmp4j.CommandResponder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||