Package org.jppf.jmxremote
Class JPPFMBeanServerConnection
java.lang.Object
org.jppf.jmxremote.JPPFMBeanServerConnection
- All Implemented Interfaces:
Closeable,AutoCloseable,MBeanServerConnection
Implementation of the
MBeanServerConnection interface for JPPF JMX remote connectors.- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionJPPFMBeanServerConnection(JPPFJMXConnector connector) Initialize with the specified message handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) voidaddNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) voidclose()createMBean(String className, ObjectName name) createMBean(String className, ObjectName name, Object[] params, String[] signature) createMBean(String className, ObjectName name, ObjectName loaderName) createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) getAttribute(ObjectName name, String attribute) getAttributes(ObjectName name, String[] attributes) String[]getMBeanInfo(ObjectName name) getObjectInstance(ObjectName name) voidhandleNotification(JMXNotification jmxNotification) Handle a new received notification.invoke(ObjectName name, String operationName, Object[] params, String[] signature) booleanisInstanceOf(ObjectName name, String className) booleanisRegistered(ObjectName name) queryMBeans(ObjectName name, QueryExp query) queryNames(ObjectName name, QueryExp query) voidremoveNotificationListener(ObjectName name, NotificationListener listener) voidremoveNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) voidremoveNotificationListener(ObjectName name, ObjectName listener) voidremoveNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) voidsetAttribute(ObjectName name, Attribute attribute) setAttributes(ObjectName name, AttributeList attributes) voidunregisterMBean(ObjectName name)
-
Constructor Details
-
JPPFMBeanServerConnection
Initialize with the specified message handler.- Parameters:
connector- the JMX connector that created this mbean server connection.
-
-
Method Details
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, IOException - Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionIOException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException, IOException -
createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, IOException - Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionIOException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException, IOException -
unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException, IOException - Specified by:
unregisterMBeanin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionMBeanRegistrationExceptionIOException
-
getObjectInstance
public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException, IOException - Specified by:
getObjectInstancein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIOException
-
queryMBeans
- Specified by:
queryMBeansin interfaceMBeanServerConnection- Throws:
IOException
-
queryNames
- Specified by:
queryNamesin interfaceMBeanServerConnection- Throws:
IOException
-
isRegistered
- Specified by:
isRegisteredin interfaceMBeanServerConnection- Throws:
IOException
-
getMBeanCount
- Specified by:
getMBeanCountin interfaceMBeanServerConnection- Throws:
IOException
-
getAttribute
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, IOException - Specified by:
getAttributein interfaceMBeanServerConnection- Throws:
MBeanExceptionAttributeNotFoundExceptionInstanceNotFoundExceptionReflectionExceptionIOException
-
getAttributes
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException, IOException - Specified by:
getAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionExceptionIOException
-
setAttribute
public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException, IOException - Specified by:
setAttributein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionIOException
-
setAttributes
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, IOException - Specified by:
setAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionExceptionIOException
-
invoke
public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException, IOException - Specified by:
invokein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionMBeanExceptionReflectionExceptionIOException
-
getDefaultDomain
- Specified by:
getDefaultDomainin interfaceMBeanServerConnection- Throws:
IOException
-
getDomains
- Specified by:
getDomainsin interfaceMBeanServerConnection- Throws:
IOException
-
addNotificationListener
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, IOException - Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIOException
-
addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, IOException - Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIOException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException, IOException - Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundExceptionIOException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException, IOException - Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundExceptionIOException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException, IOException - Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundExceptionIOException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException, IOException - Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundExceptionIOException
-
getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException - Specified by:
getMBeanInfoin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIntrospectionExceptionReflectionExceptionIOException
-
isInstanceOf
public boolean isInstanceOf(ObjectName name, String className) throws InstanceNotFoundException, IOException - Specified by:
isInstanceOfin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getMessageHandler
- Returns:
- the message handler.
-
handleNotification
Handle a new received notification.- Parameters:
jmxNotification- the notification message to process.- Throws:
Exception- if any error occurs.
-