Package oshi.demo.jmx
Class JMXOshiAgentServer
java.lang.Object
oshi.demo.jmx.JMXOshiAgentServer
- All Implemented Interfaces:
MBeanServer
,MBeanServerConnection
,JMXOshiAgent
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotificationListener
(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) void
addNotificationListener
(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 JMXOshiAgentServer
getInstance
(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) boolean
isInstanceOf
(ObjectName name, String className) boolean
isRegistered
(ObjectName name) queryMBeans
(ObjectName name, QueryExp query) queryNames
(ObjectName name, QueryExp query) registerMBean
(Object object, ObjectName name) void
removeNotificationListener
(ObjectName name, NotificationListener listener) void
removeNotificationListener
(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) void
removeNotificationListener
(ObjectName name, ObjectName listener) void
removeNotificationListener
(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) void
setAttribute
(ObjectName name, Attribute attribute) setAttributes
(ObjectName name, AttributeList attributes) void
void
void
unregisterMBean
(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:
startAgent
in interfaceJMXOshiAgent
- Throws:
IOException
-
stopAgent
- Specified by:
stopAgent
in interfaceJMXOshiAgent
- Throws:
IOException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException - Specified by:
createMBean
in interfaceMBeanServer
- Specified by:
createMBean
in interfaceMBeanServerConnection
- Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException - Specified by:
createMBean
in interfaceMBeanServer
- Specified by:
createMBean
in interfaceMBeanServerConnection
- Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException - Specified by:
createMBean
in interfaceMBeanServer
- Specified by:
createMBean
in interfaceMBeanServerConnection
- Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException - Specified by:
createMBean
in interfaceMBeanServer
- Specified by:
createMBean
in interfaceMBeanServerConnection
- Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
-
registerMBean
public ObjectInstance registerMBean(Object object, ObjectName name) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException - Specified by:
registerMBean
in interfaceMBeanServer
- Throws:
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException
-
unregisterMBean
public void unregisterMBean(ObjectName name) throws InstanceNotFoundException, MBeanRegistrationException - Specified by:
unregisterMBean
in interfaceMBeanServer
- Specified by:
unregisterMBean
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
MBeanRegistrationException
-
getObjectInstance
- Specified by:
getObjectInstance
in interfaceMBeanServer
- Specified by:
getObjectInstance
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
-
queryMBeans
- Specified by:
queryMBeans
in interfaceMBeanServer
- Specified by:
queryMBeans
in interfaceMBeanServerConnection
-
queryNames
- Specified by:
queryNames
in interfaceMBeanServer
- Specified by:
queryNames
in interfaceMBeanServerConnection
-
isRegistered
- Specified by:
isRegistered
in interfaceMBeanServer
- Specified by:
isRegistered
in interfaceMBeanServerConnection
-
getMBeanCount
- Specified by:
getMBeanCount
in interfaceMBeanServer
- Specified by:
getMBeanCount
in interfaceMBeanServerConnection
-
getAttribute
public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException - Specified by:
getAttribute
in interfaceMBeanServer
- Specified by:
getAttribute
in interfaceMBeanServerConnection
- Throws:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
-
getAttributes
public AttributeList getAttributes(ObjectName name, String[] attributes) throws InstanceNotFoundException, ReflectionException - Specified by:
getAttributes
in interfaceMBeanServer
- Specified by:
getAttributes
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
ReflectionException
-
setAttribute
public void setAttribute(ObjectName name, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException - Specified by:
setAttribute
in interfaceMBeanServer
- Specified by:
setAttribute
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
-
setAttributes
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException - Specified by:
setAttributes
in interfaceMBeanServer
- Specified by:
setAttributes
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
ReflectionException
-
invoke
public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException - Specified by:
invoke
in interfaceMBeanServer
- Specified by:
invoke
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
MBeanException
ReflectionException
-
getDefaultDomain
- Specified by:
getDefaultDomain
in interfaceMBeanServer
- Specified by:
getDefaultDomain
in interfaceMBeanServerConnection
-
getDomains
- Specified by:
getDomains
in interfaceMBeanServer
- Specified by:
getDomains
in interfaceMBeanServerConnection
-
addNotificationListener
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException - Specified by:
addNotificationListener
in interfaceMBeanServer
- Specified by:
addNotificationListener
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
-
addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException - Specified by:
addNotificationListener
in interfaceMBeanServer
- Specified by:
addNotificationListener
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListener
in interfaceMBeanServer
- Specified by:
removeNotificationListener
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListener
in interfaceMBeanServer
- Specified by:
removeNotificationListener
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListener
in interfaceMBeanServer
- Specified by:
removeNotificationListener
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
-
removeNotificationListener
public void removeNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, ListenerNotFoundException - Specified by:
removeNotificationListener
in interfaceMBeanServer
- Specified by:
removeNotificationListener
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
-
getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException - Specified by:
getMBeanInfo
in interfaceMBeanServer
- Specified by:
getMBeanInfo
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
IntrospectionException
ReflectionException
-
isInstanceOf
- Specified by:
isInstanceOf
in interfaceMBeanServer
- Specified by:
isInstanceOf
in interfaceMBeanServerConnection
- Throws:
InstanceNotFoundException
-
instantiate
- Specified by:
instantiate
in interfaceMBeanServer
- Throws:
ReflectionException
MBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException - Specified by:
instantiate
in interfaceMBeanServer
- Throws:
ReflectionException
MBeanException
InstanceNotFoundException
-
instantiate
public Object instantiate(String className, Object[] params, String[] signature) throws ReflectionException, MBeanException - Specified by:
instantiate
in interfaceMBeanServer
- Throws:
ReflectionException
MBeanException
-
instantiate
public Object instantiate(String className, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, MBeanException, InstanceNotFoundException - Specified by:
instantiate
in interfaceMBeanServer
- Throws:
ReflectionException
MBeanException
InstanceNotFoundException
-
deserialize
public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException, OperationsException - Specified by:
deserialize
in interfaceMBeanServer
- Throws:
InstanceNotFoundException
OperationsException
-
deserialize
public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException - Specified by:
deserialize
in interfaceMBeanServer
- Throws:
OperationsException
ReflectionException
-
deserialize
public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws InstanceNotFoundException, OperationsException, ReflectionException - Specified by:
deserialize
in interfaceMBeanServer
- Throws:
InstanceNotFoundException
OperationsException
ReflectionException
-
getClassLoaderFor
- Specified by:
getClassLoaderFor
in interfaceMBeanServer
- Throws:
InstanceNotFoundException
-
getClassLoader
- Specified by:
getClassLoader
in interfaceMBeanServer
- Throws:
InstanceNotFoundException
-
getClassLoaderRepository
- Specified by:
getClassLoaderRepository
in interfaceMBeanServer
-