Package io.trino.plugin.base.jmx
Class RebindSafeMBeanServer
java.lang.Object
io.trino.plugin.base.jmx.RebindSafeMBeanServer
- All Implemented Interfaces:
MBeanServer,MBeanServerConnection
MBeanServer wrapper that a ignores calls to registerMBean when there is already
a MBean registered with the specified object name.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object context) voidaddNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object context) 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) Deprecated.deserialize(String className, ObjectName loaderName, byte[] data) Deprecated.deserialize(ObjectName name, byte[] data) Deprecated.getAttribute(ObjectName name, String attribute) getAttributes(ObjectName name, String[] attributes) getClassLoader(ObjectName loaderName) getClassLoaderFor(ObjectName mbeanName) String[]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) Delegates to the wrapped mbean server, but if a mbean is already registered with the specified name, the existing instance is returned.voidremoveNotificationListener(ObjectName name, NotificationListener listener) voidremoveNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object context) voidremoveNotificationListener(ObjectName name, ObjectName listener) voidremoveNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object context) voidsetAttribute(ObjectName name, Attribute attribute) setAttributes(ObjectName name, AttributeList attributes) voidunregisterMBean(ObjectName name)
-
Constructor Details
-
RebindSafeMBeanServer
-
-
Method Details
-
registerMBean
public ObjectInstance registerMBean(Object object, ObjectName name) throws MBeanRegistrationException, NotCompliantMBeanException Delegates to the wrapped mbean server, but if a mbean is already registered with the specified name, the existing instance is returned.- Specified by:
registerMBeanin interfaceMBeanServer- Throws:
MBeanRegistrationExceptionNotCompliantMBeanException
-
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 context) throws InstanceNotFoundException - Specified by:
addNotificationListenerin interfaceMBeanServer- Specified by:
addNotificationListenerin interfaceMBeanServerConnection- Throws:
InstanceNotFoundException
-
addNotificationListener
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object context) 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 context) 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 context) 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
@Deprecated public ObjectInputStream deserialize(ObjectName name, byte[] data) throws OperationsException Deprecated.- Specified by:
deserializein interfaceMBeanServer- Throws:
OperationsException
-
deserialize
@Deprecated public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException, ReflectionException Deprecated.- Specified by:
deserializein interfaceMBeanServer- Throws:
OperationsExceptionReflectionException
-
deserialize
@Deprecated public ObjectInputStream deserialize(String className, ObjectName loaderName, byte[] data) throws OperationsException, ReflectionException Deprecated.- Specified by:
deserializein interfaceMBeanServer- Throws:
OperationsExceptionReflectionException
-
getClassLoaderFor
- Specified by:
getClassLoaderForin interfaceMBeanServer- Throws:
InstanceNotFoundException
-
getClassLoader
- Specified by:
getClassLoaderin interfaceMBeanServer- Throws:
InstanceNotFoundException
-
getClassLoaderRepository
- Specified by:
getClassLoaderRepositoryin interfaceMBeanServer
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanExceptionNotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanExceptionNotCompliantMBeanException
-
createMBean
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException - Specified by:
createMBeanin interfaceMBeanServer- Specified by:
createMBeanin interfaceMBeanServerConnection- Throws:
ReflectionExceptionInstanceAlreadyExistsExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundException
-