|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.snmpadaptor4j.core.JmxListener
public class JmxListener
Object designed to respond to each registration or deregistration of MBeans.
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
logger
Logger. |
Constructor Summary | |
---|---|
|
JmxListener(JmxSnmpMib jmxSnmpMib,
JmxNotificationManager jmxNotificationManager,
SnmpAppContext mainAppContext,
Map<ClassLoader,SnmpAppContext> appContextMap,
boolean classLoaderScope)
Constructor. |
protected |
JmxListener(JmxSnmpMib jmxSnmpMib,
JmxNotificationManager jmxNotificationManager,
SnmpAppContext mainAppContext,
Map<ClassLoader,SnmpAppContext> appContextMap,
boolean classLoaderScope,
MBeanServer jmxServer)
Constructor (used for tests). |
Method Summary | |
---|---|
void |
close()
Closes the connection with the JMX agent. |
protected MBeanServer |
getJmxServer()
Returns the JMX agent. |
void |
handleNotification(Notification notification,
Object handback)
|
void |
open(MBeanServer server)
Opens the connection with the JMX agent. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final org.apache.log4j.Logger logger
Constructor Detail |
---|
public JmxListener(JmxSnmpMib jmxSnmpMib, JmxNotificationManager jmxNotificationManager, SnmpAppContext mainAppContext, Map<ClassLoader,SnmpAppContext> appContextMap, boolean classLoaderScope)
jmxSnmpMib
- Management Information Base (MIB) for access to JMX attributes (must not be NULL
).jmxNotificationManager
- Manager of JMX notifications (must not be NULL
).mainAppContext
- Context of main application (must not be NULL
).appContextMap
- Application context map (must not be NULL
).classLoaderScope
- TRUE
for handle only MBeans created by the same ClassLoader
that the SNMP adapter. FALSE
for handle
all MBeans of the JVM.protected JmxListener(JmxSnmpMib jmxSnmpMib, JmxNotificationManager jmxNotificationManager, SnmpAppContext mainAppContext, Map<ClassLoader,SnmpAppContext> appContextMap, boolean classLoaderScope, MBeanServer jmxServer)
jmxSnmpMib
- Management Information Base (MIB) for access to JMX attributes (must not be NULL
).jmxNotificationManager
- Manager of JMX notifications.mainAppContext
- Context of main application (must not be NULL
).appContextMap
- Application context map (must not be NULL
).classLoaderScope
- TRUE
for handle only MBeans created by the same ClassLoader
that the SNMP adapter. FALSE
for handle
all MBeans of the JVM.jmxServer
- JMX agent.Method Detail |
---|
protected final MBeanServer getJmxServer()
public void open(MBeanServer server) throws Exception
server
- JMX agent.
Exception
- Exception if an error occurred.public void close() throws Exception
Exception
- Exception if an error occurred.public final void handleNotification(Notification notification, Object handback)
handleNotification
in interface NotificationListener
public final String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |