|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.system.ListenerServiceMBeanSupport (src)
org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService
SnmpAgentService is an MBean class implementing an SNMP agent. Currently, it allows to send V1 or V2 traps to one or more SNMP managers defined by their IP address, listening port number and expected SNMP version. It will hopefully grow into a full blown SNMP agent with get/set functionality.
Nested Class Summary |
Nested classes inherited from class org.jboss.system.ListenerServiceMBeanSupport (src) |
ListenerServiceMBeanSupport.SubscriptionInfo (src) |
Field Summary | |
static java.lang.String |
DEFAULT_READ_COMMUNITY
Default communities |
static java.lang.String |
DEFAULT_WRITE_COMMUNITY
|
static int |
SNMPV1
Supported versions |
static int |
SNMPV2
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ListenerServiceMBean (src) |
SL_FILTER_ELEMENT, SL_FILTER_FACTORY_ATTRIBUTE, SL_MBEAN_ELEMENT, SL_MBEAN_HANDBACK_ATTRIBUTE, SL_MBEAN_NAME_ATTRIBUTE, SL_NOTIFICATION_ELEMENT, SL_NOTIFICATION_TYPE_ATTRIBUTE, SL_ROOT_ELEMENT |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
SnmpAgentService()
Default CTOR |
Method Summary | |
java.lang.String |
getBindAddress()
Gets the agent bind address |
boolean |
getDynamicSubscriptions()
Gets the dynamic subscriptions status |
int |
getHeartBeatPeriod()
Gets the heartbeat switch |
long |
getInstantiationTime()
Returns the difference, measured in milliseconds, between the instantiation time and midnight, January 1, 1970 UTC. |
java.lang.String |
getManagersResName()
Gets the name of the file containing SNMP manager specifications |
java.lang.String |
getNotificationMapResName()
Gets the name of the file containing the notification/trap mappings |
int |
getNumberOfThreads()
Gets the number of threads in the agent requests processing thread pool |
int |
getPort()
Gets the agent listening port number |
java.lang.String |
getRequestHandlerClassName()
Gets the RequestHandler implementation class |
java.lang.String |
getRequestHandlerResName()
Gets the resource file name containing get/set mappings |
int |
getSnmpVersion()
Gets the snmp protocol version |
ObjectName (src) |
getTimerName()
Gets the utilised timer MBean name |
long |
getTrapCount()
Returns the current trap counter reading |
java.lang.String |
getTrapFactoryClassName()
Gets the utilised trap factory name |
long |
getUptime()
Returns the up-time |
void |
handleNotification2(Notification (src) n,
java.lang.Object handback)
All notifications are intercepted here and are routed for emission. |
void |
setBindAddress(java.lang.String bindAddress)
Sets the agent bind address |
void |
setDynamicSubscriptions(boolean dynamicSubscriptions)
Enables/disables dynamic subscriptions |
void |
setHeartBeatPeriod(int heartBeatPeriod)
Sets the heartbeat period (in seconds) switch |
void |
setManagersResName(java.lang.String managersResName)
Sets the name of the file containing SNMP manager specifications |
void |
setNotificationMapResName(java.lang.String notificationMapResName)
Sets the name of the file containing the notification/trap mappings |
void |
setNumberOfThreads(int numberOfThreads)
Sets the number of threads in the agent request processing thread pool |
void |
setPort(int port)
Sets the agent listening port number |
void |
setReadCommunity(java.lang.String readCommunity)
Sets the read community (no getter) |
void |
setRequestHandlerClassName(java.lang.String requestHandlerClassName)
Sets the RequestHandler implementation class |
void |
setRequestHandlerResName(java.lang.String requestHandlerResName)
Sets the resource file name containing get/set mappings |
void |
setSnmpVersion(int snmpVersion)
Sets the snmp protocol version |
void |
setTimerName(ObjectName (src) timerName)
Sets the utilised timer MBean name |
void |
setTrapFactoryClassName(java.lang.String name)
Sets the utilised trap factory name |
void |
setWriteCommunity(java.lang.String writeCommunity)
Sets the write community (no getter) |
protected void |
startService()
Perform service start-up |
protected void |
stopService()
Perform service shutdown |
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport (src) |
handleNotification, setSubscriptionList, subscribe, subscribe, subscribe, unsubscribe |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, createService, destroy, destroyService, 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 (src) |
addNotificationListener, getNotificationInfo, handleNotification, 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 javax.management.NotificationListener (src) |
handleNotification |
Methods inherited from interface org.jboss.system.ServiceMBean (src) |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service (src) |
create, destroy, start, stop |
Field Detail |
public static final int SNMPV1
public static final int SNMPV2
public static final java.lang.String DEFAULT_READ_COMMUNITY
public static final java.lang.String DEFAULT_WRITE_COMMUNITY
Constructor Detail |
public SnmpAgentService()
Method Detail |
public int getHeartBeatPeriod()
public void setHeartBeatPeriod(int heartBeatPeriod)
public long getInstantiationTime()
public long getUptime()
public long getTrapCount()
public void setManagersResName(java.lang.String managersResName)
public java.lang.String getManagersResName()
public void setNotificationMapResName(java.lang.String notificationMapResName)
public java.lang.String getNotificationMapResName()
public void setTrapFactoryClassName(java.lang.String name)
public java.lang.String getTrapFactoryClassName()
public void setTimerName(ObjectName (src) timerName)
public ObjectName (src) getTimerName()
public void setBindAddress(java.lang.String bindAddress) throws java.net.UnknownHostException
java.net.UnknownHostException
public java.lang.String getBindAddress()
public void setNumberOfThreads(int numberOfThreads)
public int getNumberOfThreads()
public void setPort(int port)
public int getPort()
public void setSnmpVersion(int snmpVersion)
public int getSnmpVersion()
public void setReadCommunity(java.lang.String readCommunity)
public void setWriteCommunity(java.lang.String writeCommunity)
public void setRequestHandlerClassName(java.lang.String requestHandlerClassName)
public java.lang.String getRequestHandlerClassName()
public void setRequestHandlerResName(java.lang.String requestHandlerResName)
public java.lang.String getRequestHandlerResName()
public void setDynamicSubscriptions(boolean dynamicSubscriptions)
public boolean getDynamicSubscriptions()
protected void startService() throws java.lang.Exception
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
protected void stopService() throws java.lang.Exception
stopService
in class ServiceMBeanSupport (src)
java.lang.Exception
public void handleNotification2(Notification (src) n, java.lang.Object handback)
handleNotification2
in class ListenerServiceMBeanSupport (src)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |