|
|||||||||||
| 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.system.ListenerServiceMBeanSupport
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 |
org.jboss.system.ListenerServiceMBeanSupport.SubscriptionInfo |
| Field Summary | |
static String |
DEFAULT_READ_COMMUNITY
Default communities |
static String |
DEFAULT_WRITE_COMMUNITY
|
static int |
SNMPV1
Supported versions |
static int |
SNMPV2
|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ListenerServiceMBean |
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 |
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 | |
String |
getBindAddress()
Gets the agent bind address |
int |
getHeartBeatPeriod()
Gets the heartbeat switch |
long |
getInstantiationTime()
Returns the difference, measured in milliseconds, between the instantiation time and midnight, January 1, 1970 UTC. |
String |
getManagersResName()
Gets the name of the file containing SNMP manager specifications |
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 |
String |
getRequestHandlerClassName()
Gets the RequestHandler implementation class |
String |
getRequestHandlerResName()
Gets the resource file name containing get/set mappings |
int |
getSnmpVersion()
Gets the snmp protocol version |
javax.management.ObjectName |
getTimerName()
Gets the utilised timer MBean name |
long |
getTrapCount()
Returns the current trap counter reading |
String |
getTrapFactoryClassName()
Gets the utilised trap factory name |
long |
getUptime()
Returns the up-time |
void |
handleNotification2(javax.management.Notification n,
Object handback)
All notifications are intercepted here and are routed for emission. |
void |
setBindAddress(String bindAddress)
Sets the agent bind address |
void |
setHeartBeatPeriod(int heartBeatPeriod)
Sets the heartbeat period (in seconds) switch |
void |
setManagersResName(String managersResName)
Sets the name of the file containing SNMP manager specifications |
void |
setNotificationMapResName(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(String readCommunity)
Sets the read community (no getter) |
void |
setRequestHandlerClassName(String requestHandlerClassName)
Sets the RequestHandler implementation class |
void |
setRequestHandlerResName(String requestHandlerResName)
Sets the resource file name containing get/set mappings |
void |
setSnmpVersion(int snmpVersion)
Sets the snmp protocol version |
void |
setTimerName(javax.management.ObjectName timerName)
Sets the utilised timer MBean name |
void |
setTrapFactoryClassName(String name)
Sets the utilised trap factory name |
void |
setWriteCommunity(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 |
handleNotification, setSubscriptionList, subscribe, subscribe, subscribe, unsubscribe |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport |
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 |
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 |
handleNotification |
| Methods inherited from interface org.jboss.system.ListenerServiceMBean |
setSubscriptionList |
| 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 |
public static final int SNMPV1
public static final int SNMPV2
public static final String DEFAULT_READ_COMMUNITY
public static final String DEFAULT_WRITE_COMMUNITY
| Constructor Detail |
public SnmpAgentService()
| Method Detail |
public int getHeartBeatPeriod()
getHeartBeatPeriod in interface SnmpAgentServiceMBeanpublic void setHeartBeatPeriod(int heartBeatPeriod)
setHeartBeatPeriod in interface SnmpAgentServiceMBeanpublic long getInstantiationTime()
getInstantiationTime in interface SnmpAgentServiceMBeanpublic long getUptime()
getUptime in interface SnmpAgentServiceMBeanpublic long getTrapCount()
getTrapCount in interface SnmpAgentServiceMBeanpublic void setManagersResName(String managersResName)
setManagersResName in interface SnmpAgentServiceMBeanpublic String getManagersResName()
getManagersResName in interface SnmpAgentServiceMBeanpublic void setNotificationMapResName(String notificationMapResName)
setNotificationMapResName in interface SnmpAgentServiceMBeanpublic String getNotificationMapResName()
getNotificationMapResName in interface SnmpAgentServiceMBeanpublic void setTrapFactoryClassName(String name)
setTrapFactoryClassName in interface SnmpAgentServiceMBeanpublic String getTrapFactoryClassName()
getTrapFactoryClassName in interface SnmpAgentServiceMBeanpublic void setTimerName(javax.management.ObjectName timerName)
setTimerName in interface SnmpAgentServiceMBeanpublic javax.management.ObjectName getTimerName()
getTimerName in interface SnmpAgentServiceMBeanpublic void setBindAddress(String bindAddress) throws UnknownHostException
setBindAddress in interface SnmpAgentServiceMBeanUnknownHostExceptionpublic String getBindAddress()
getBindAddress in interface SnmpAgentServiceMBeanpublic void setNumberOfThreads(int numberOfThreads)
setNumberOfThreads in interface SnmpAgentServiceMBeanpublic int getNumberOfThreads()
getNumberOfThreads in interface SnmpAgentServiceMBeanpublic void setPort(int port)
setPort in interface SnmpAgentServiceMBeanpublic int getPort()
getPort in interface SnmpAgentServiceMBeanpublic void setSnmpVersion(int snmpVersion)
setSnmpVersion in interface SnmpAgentServiceMBeanpublic int getSnmpVersion()
getSnmpVersion in interface SnmpAgentServiceMBeanpublic void setReadCommunity(String readCommunity)
setReadCommunity in interface SnmpAgentServiceMBeanpublic void setWriteCommunity(String writeCommunity)
setWriteCommunity in interface SnmpAgentServiceMBeanpublic void setRequestHandlerClassName(String requestHandlerClassName)
setRequestHandlerClassName in interface SnmpAgentServiceMBeanpublic String getRequestHandlerClassName()
getRequestHandlerClassName in interface SnmpAgentServiceMBeanpublic void setRequestHandlerResName(String requestHandlerResName)
setRequestHandlerResName in interface SnmpAgentServiceMBeanpublic String getRequestHandlerResName()
getRequestHandlerResName in interface SnmpAgentServiceMBean
protected void startService()
throws Exception
Exception
protected void stopService()
throws Exception
Exception
public void handleNotification2(javax.management.Notification n,
Object handback)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||