|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 SnmpAgentServiceMBean
public void setHeartBeatPeriod(int heartBeatPeriod)
setHeartBeatPeriod
in interface SnmpAgentServiceMBean
public long getInstantiationTime()
getInstantiationTime
in interface SnmpAgentServiceMBean
public long getUptime()
getUptime
in interface SnmpAgentServiceMBean
public long getTrapCount()
getTrapCount
in interface SnmpAgentServiceMBean
public void setManagersResName(String managersResName)
setManagersResName
in interface SnmpAgentServiceMBean
public String getManagersResName()
getManagersResName
in interface SnmpAgentServiceMBean
public void setNotificationMapResName(String notificationMapResName)
setNotificationMapResName
in interface SnmpAgentServiceMBean
public String getNotificationMapResName()
getNotificationMapResName
in interface SnmpAgentServiceMBean
public void setTrapFactoryClassName(String name)
setTrapFactoryClassName
in interface SnmpAgentServiceMBean
public String getTrapFactoryClassName()
getTrapFactoryClassName
in interface SnmpAgentServiceMBean
public void setTimerName(javax.management.ObjectName timerName)
setTimerName
in interface SnmpAgentServiceMBean
public javax.management.ObjectName getTimerName()
getTimerName
in interface SnmpAgentServiceMBean
public void setBindAddress(String bindAddress) throws UnknownHostException
setBindAddress
in interface SnmpAgentServiceMBean
UnknownHostException
public String getBindAddress()
getBindAddress
in interface SnmpAgentServiceMBean
public void setNumberOfThreads(int numberOfThreads)
setNumberOfThreads
in interface SnmpAgentServiceMBean
public int getNumberOfThreads()
getNumberOfThreads
in interface SnmpAgentServiceMBean
public void setPort(int port)
setPort
in interface SnmpAgentServiceMBean
public int getPort()
getPort
in interface SnmpAgentServiceMBean
public void setSnmpVersion(int snmpVersion)
setSnmpVersion
in interface SnmpAgentServiceMBean
public int getSnmpVersion()
getSnmpVersion
in interface SnmpAgentServiceMBean
public void setReadCommunity(String readCommunity)
setReadCommunity
in interface SnmpAgentServiceMBean
public void setWriteCommunity(String writeCommunity)
setWriteCommunity
in interface SnmpAgentServiceMBean
public void setRequestHandlerClassName(String requestHandlerClassName)
setRequestHandlerClassName
in interface SnmpAgentServiceMBean
public String getRequestHandlerClassName()
getRequestHandlerClassName
in interface SnmpAgentServiceMBean
public void setRequestHandlerResName(String requestHandlerResName)
setRequestHandlerResName
in interface SnmpAgentServiceMBean
public 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 |