public class DynamicInterceptor extends Object implements MBeanServer
When instantiated at startup, the instance of this class that wraps the real MBeanServer is termed the "Primary Interceptor". There can only be one such Interceptor for each real* MBeanServer. MBeanServer #0 is the Platform MBeanServer, and this class must be used for GlassFish. Additional MBeanServers can be created if desired.
This class can also be used to implement an Interceptor which can be set for use by the Primary Interceptor. Such interceptors are used only for get/setAttribute(s) and invoke(), though the use of them could be expanded for other methods.
Note that many methods are declared 'final' for efficiency. If a subclass needs to override a method, remove 'final'. Until that time, we might as well remain efficient, since most methods won't be overridden.
| Constructor and Description |
|---|
DynamicInterceptor() |
public MBeanServer getDelegateMBeanServer()
public void setDelegateMBeanServer(MBeanServer server)
public Object invoke(ObjectName objectName, String operationName, Object[] params, String[] signature) throws ReflectionException, InstanceNotFoundException, MBeanException
invoke in interface MBeanServerinvoke in interface MBeanServerConnectionReflectionExceptionInstanceNotFoundExceptionMBeanExceptionpublic final Object getAttribute(ObjectName objectName, String attributeName) throws InstanceNotFoundException, AttributeNotFoundException, MBeanException, ReflectionException
getAttribute in interface MBeanServergetAttribute in interface MBeanServerConnectionInstanceNotFoundExceptionAttributeNotFoundExceptionMBeanExceptionReflectionExceptionpublic void setAttribute(ObjectName objectName, Attribute attribute) throws InstanceNotFoundException, AttributeNotFoundException, MBeanException, ReflectionException, InvalidAttributeValueException
setAttribute in interface MBeanServersetAttribute in interface MBeanServerConnectionInstanceNotFoundExceptionAttributeNotFoundExceptionMBeanExceptionReflectionExceptionInvalidAttributeValueExceptionpublic final AttributeList getAttributes(ObjectName objectName, String[] attrNames) throws InstanceNotFoundException, ReflectionException
getAttributes in interface MBeanServergetAttributes in interface MBeanServerConnectionInstanceNotFoundExceptionReflectionExceptionpublic AttributeList setAttributes(ObjectName objectName, AttributeList attributeList) throws InstanceNotFoundException, ReflectionException
setAttributes in interface MBeanServersetAttributes in interface MBeanServerConnectionInstanceNotFoundExceptionReflectionExceptionpublic final ObjectInstance registerMBean(Object obj, ObjectName objectName) throws NotCompliantMBeanException, MBeanRegistrationException, InstanceAlreadyExistsException
registerMBean in interface MBeanServerNotCompliantMBeanExceptionMBeanRegistrationExceptionInstanceAlreadyExistsExceptionpublic final void unregisterMBean(ObjectName objectName) throws InstanceNotFoundException, MBeanRegistrationException
unregisterMBean in interface MBeanServerunregisterMBean in interface MBeanServerConnectionInstanceNotFoundExceptionMBeanRegistrationExceptionpublic final Integer getMBeanCount()
getMBeanCount in interface MBeanServergetMBeanCount in interface MBeanServerConnectionpublic final Set queryMBeans(ObjectName objectName, QueryExp expr)
queryMBeans in interface MBeanServerqueryMBeans in interface MBeanServerConnectionpublic final MBeanInfo getMBeanInfo(ObjectName objectName) throws InstanceNotFoundException, IntrospectionException, ReflectionException
getMBeanInfo in interface MBeanServergetMBeanInfo in interface MBeanServerConnectionInstanceNotFoundExceptionIntrospectionExceptionReflectionExceptionpublic final boolean isRegistered(ObjectName objectName)
isRegistered in interface MBeanServerisRegistered in interface MBeanServerConnectionpublic final void addNotificationListener(ObjectName objectName, NotificationListener notificationListener, NotificationFilter notificationFilter, Object obj) throws InstanceNotFoundException
addNotificationListener in interface MBeanServeraddNotificationListener in interface MBeanServerConnectionInstanceNotFoundExceptionpublic final void addNotificationListener(ObjectName objectName, ObjectName objectName1, NotificationFilter notificationFilter, Object obj) throws InstanceNotFoundException
addNotificationListener in interface MBeanServeraddNotificationListener in interface MBeanServerConnectionInstanceNotFoundExceptionpublic final ObjectInstance createMBean(String str, ObjectName objectName) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionpublic final ObjectInstance createMBean(String str, ObjectName objectName, ObjectName objectName2) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundExceptionpublic final ObjectInstance createMBean(String str, ObjectName objectName, Object[] obj, String[] str3) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionpublic final ObjectInstance createMBean(String str, ObjectName objectName, ObjectName objectName2, Object[] obj, String[] str4) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionMBeanExceptionNotCompliantMBeanExceptionInstanceNotFoundExceptionpublic final ObjectInputStream deserialize(String str, byte[] values) throws OperationsException, ReflectionException
deserialize in interface MBeanServerOperationsExceptionReflectionExceptionpublic final ObjectInputStream deserialize(ObjectName objectName, byte[] values) throws InstanceNotFoundException, OperationsException
deserialize in interface MBeanServerInstanceNotFoundExceptionOperationsExceptionpublic final ObjectInputStream deserialize(String str, ObjectName objectName, byte[] values) throws InstanceNotFoundException, OperationsException, ReflectionException
deserialize in interface MBeanServerInstanceNotFoundExceptionOperationsExceptionReflectionExceptionpublic final String getDefaultDomain()
getDefaultDomain in interface MBeanServergetDefaultDomain in interface MBeanServerConnectionpublic final ObjectInstance getObjectInstance(ObjectName objectName) throws InstanceNotFoundException
getObjectInstance in interface MBeanServergetObjectInstance in interface MBeanServerConnectionInstanceNotFoundExceptionpublic final Object instantiate(String str) throws ReflectionException, MBeanException
instantiate in interface MBeanServerReflectionExceptionMBeanExceptionpublic final Object instantiate(String str, ObjectName objectName) throws ReflectionException, MBeanException, InstanceNotFoundException
instantiate in interface MBeanServerReflectionExceptionMBeanExceptionInstanceNotFoundExceptionpublic final Object instantiate(String str, Object[] obj, String[] str2) throws ReflectionException, MBeanException
instantiate in interface MBeanServerReflectionExceptionMBeanExceptionpublic final Object instantiate(String str, ObjectName objectName, Object[] obj, String[] str3) throws ReflectionException, MBeanException, InstanceNotFoundException
instantiate in interface MBeanServerReflectionExceptionMBeanExceptionInstanceNotFoundExceptionpublic final boolean isInstanceOf(ObjectName objectName, String str) throws InstanceNotFoundException
isInstanceOf in interface MBeanServerisInstanceOf in interface MBeanServerConnectionInstanceNotFoundExceptionpublic final Set queryNames(ObjectName objectName, QueryExp queryExp)
queryNames in interface MBeanServerqueryNames in interface MBeanServerConnectionpublic final void removeNotificationListener(ObjectName objectName, ObjectName objectName1) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundExceptionListenerNotFoundExceptionpublic final void removeNotificationListener(ObjectName objectName, NotificationListener notificationListener) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundExceptionListenerNotFoundExceptionpublic final void removeNotificationListener(ObjectName objectName, NotificationListener notificationListener, NotificationFilter notificationFilter, Object obj) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundExceptionListenerNotFoundExceptionpublic final void removeNotificationListener(ObjectName objectName, ObjectName objectName1, NotificationFilter notificationFilter, Object obj) throws InstanceNotFoundException, ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundExceptionListenerNotFoundExceptionpublic final ClassLoader getClassLoader(ObjectName objectName) throws InstanceNotFoundException
getClassLoader in interface MBeanServerInstanceNotFoundExceptionpublic final ClassLoader getClassLoaderFor(ObjectName objectName) throws InstanceNotFoundException
getClassLoaderFor in interface MBeanServerInstanceNotFoundExceptionpublic final ClassLoaderRepository getClassLoaderRepository()
getClassLoaderRepository in interface MBeanServerpublic final String[] getDomains()
getDomains in interface MBeanServergetDomains in interface MBeanServerConnectionCopyright © 2019. All rights reserved.