Package oshi.demo.jmx
Class JMXOshiAgentServer
java.lang.Object
oshi.demo.jmx.JMXOshiAgentServer
- All Implemented Interfaces:
MBeanServer,MBeanServerConnection,JMXOshiAgent
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) voidaddNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) 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) deserialize(String className, byte[] data) deserialize(String className, ObjectName loaderName, byte[] data) deserialize(ObjectName name, byte[] data) getAttribute(ObjectName name, String attribute) getAttributes(ObjectName name, String[] attributes) getClassLoader(ObjectName loaderName) getClassLoaderFor(ObjectName mbeanName) String[]protected static JMXOshiAgentServergetInstance(String host, Integer port, Map<String, ?> properties, ContextRegistrationPlatform platform) getMBeanInfo(ObjectName name) getObjectInstance(ObjectName name) instantiate(String className) instantiate(String className, Object[] params, String[] signature) instantiate(String className, ObjectName loaderName) instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) 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) registerMBean(Object object, ObjectName name) 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) voidvoidvoidunregisterMBean(ObjectName name)
-
Method Details
-
getInstance
protected static JMXOshiAgentServer getInstance(String host, Integer port, Map<String, ?> properties, ContextRegistrationPlatform platform) throws Exception- Throws:
Exception
-
startAgent
- Specified by:
startAgentin interfaceJMXOshiAgent- Throws:
IOException
-
stopAgent
- Specified by:
stopAgentin interfaceJMXOshiAgent- Throws:
IOException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundException
-
registerMBean
public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException - Specified by:
registerMBeanin interfaceMBeanServer- Throws:
InstanceAlreadyExistsExceptionMBeanRegistrationExceptionNotCompliantMBeanException
-
unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException - Specified by:
unregisterMBeanin interfaceMBeanServer- Specified by:
unregisterMBeanin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionMBeanRegistrationException
-
getObjectInstance
- Specified by:
getObjectInstancein interfaceMBeanServer- Specified by:
getObjectInstancein interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
queryMBeans
- Specified by:
queryMBeansin interfaceMBeanServer- Specified by:
queryMBeansin interfaceMBeanServerConnection
-
queryNames
- Specified by:
queryNamesin interfaceMBeanServer- Specified by:
queryNamesin interfaceMBeanServerConnection
-
isRegistered
- Specified by:
isRegisteredin interfaceMBeanServer- Specified by:
isRegisteredin interfaceMBeanServerConnection
-
getMBeanCount
- Specified by:
getMBeanCountin interfaceMBeanServer- Specified by:
getMBeanCountin interfaceMBeanServerConnection
-
getAttribute
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException - Specified by:
getAttributein interfaceMBeanServer- Specified by:
getAttributein interfaceMBeanServerConnection- Throws:
MBeanExceptionAttributeNotFoundExceptionInstanceNotFoundExceptionReflectionException
-
getAttributes
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException - Specified by:
getAttributesin interfaceMBeanServer- Specified by:
getAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionException
-
setAttribute
public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException - Specified by:
setAttributein interfaceMBeanServer- Specified by:
setAttributein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionException
-
setAttributes
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException - Specified by:
setAttributesin interfaceMBeanServer- Specified by:
setAttributesin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionReflectionException
-
invoke
public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException - Specified by:
invokein interfaceMBeanServer- Specified by:
invokein interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionMBeanExceptionReflectionException
-
getDefaultDomain
- Specified by:
getDefaultDomainin interfaceMBeanServer- Specified by:
getDefaultDomainin interfaceMBeanServerConnection
-
getDomains
- Specified by:
getDomainsin interfaceMBeanServer- Specified by:
getDomainsin interfaceMBeanServerConnection
-
addNotificationListener
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException - Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException - Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListenerin interfaceMBeanServer- Specified by:
removeNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionListenerNotFoundException
-
getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException - Specified by:
getMBeanInfoin interfaceMBeanServer- Specified by:
getMBeanInfoin interfaceMBeanServerConnection- Throws:
InstanceNotFoundExceptionIntrospectionExceptionReflectionException
-
isInstanceOf
- Specified by:
isInstanceOfin interfaceMBeanServer- Specified by:
isInstanceOfin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
instantiate
- Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException - Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanExceptionInstanceNotFoundException
-
instantiate
public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException - Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException - Specified by:
instantiatein interfaceMBeanServer- Throws:
ReflectionExceptionMBeanExceptionInstanceNotFoundException
-
deserialize
public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, OperationsException - Specified by:
deserializein interfaceMBeanServer- Throws:
InstanceNotFoundExceptionOperationsException
-
deserialize
public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException - Specified by:
deserializein interfaceMBeanServer- Throws:
OperationsExceptionReflectionException
-
deserialize
public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, ReflectionException - Specified by:
deserializein interfaceMBeanServer- Throws:
InstanceNotFoundExceptionOperationsExceptionReflectionException
-
getClassLoaderFor
- Specified by:
getClassLoaderForin interfaceMBeanServer- Throws:
InstanceNotFoundException
-
getClassLoader
- Specified by:
getClassLoaderin interfaceMBeanServer- Throws:
InstanceNotFoundException
-
getClassLoaderRepository
- Specified by:
getClassLoaderRepositoryin interfaceMBeanServer
-