org.apache.openejb.monitoring
Class LocalMBeanServer
java.lang.Object
org.apache.openejb.monitoring.LocalMBeanServer
- All Implemented Interfaces:
- MBeanServer, MBeanServerConnection
public class LocalMBeanServer
- extends Object
- implements MBeanServer
|
Method Summary |
void |
addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
|
void |
addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
|
ObjectInstance |
createMBean(String className,
ObjectName name)
|
ObjectInstance |
createMBean(String className,
ObjectName name,
Object[] params,
String[] signature)
|
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loaderName)
|
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loaderName,
Object[] params,
String[] signature)
|
ObjectInputStream |
deserialize(ObjectName name,
byte[] data)
|
ObjectInputStream |
deserialize(String className,
byte[] data)
|
ObjectInputStream |
deserialize(String className,
ObjectName loaderName,
byte[] data)
|
static MBeanServer |
get()
|
Object |
getAttribute(ObjectName name,
String attribute)
|
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
|
ClassLoader |
getClassLoader(ObjectName loaderName)
|
ClassLoader |
getClassLoaderFor(ObjectName mbeanName)
|
ClassLoaderRepository |
getClassLoaderRepository()
|
String |
getDefaultDomain()
|
String[] |
getDomains()
|
Integer |
getMBeanCount()
|
MBeanInfo |
getMBeanInfo(ObjectName name)
|
ObjectInstance |
getObjectInstance(ObjectName name)
|
Object |
instantiate(String className)
|
Object |
instantiate(String className,
Object[] params,
String[] signature)
|
Object |
instantiate(String className,
ObjectName loaderName)
|
Object |
instantiate(String className,
ObjectName loaderName,
Object[] params,
String[] signature)
|
Object |
invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
|
boolean |
isInstanceOf(ObjectName name,
String className)
|
static boolean |
isJMXActive()
|
boolean |
isRegistered(ObjectName name)
|
Set<ObjectInstance> |
queryMBeans(ObjectName name,
QueryExp query)
|
Set<ObjectName> |
queryNames(ObjectName name,
QueryExp query)
|
ObjectInstance |
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)
|
static void |
reset()
|
void |
setAttribute(ObjectName name,
Attribute attribute)
|
AttributeList |
setAttributes(ObjectName name,
AttributeList attributes)
|
void |
unregisterMBean(ObjectName name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPENEJB_JMX_ACTIVE
public static final String OPENEJB_JMX_ACTIVE
- See Also:
- Constant Field Values
reset
public static void reset()
get
public static MBeanServer get()
isJMXActive
public static boolean isJMXActive()
createMBean
public ObjectInstance createMBean(String className,
ObjectName name)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException
- Specified by:
createMBean in interface MBeanServer- Specified by:
createMBean in interface MBeanServerConnection
- 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 interface MBeanServer- Specified by:
createMBean in interface MBeanServerConnection
- 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 interface MBeanServer- Specified by:
createMBean in interface MBeanServerConnection
- 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 interface MBeanServer- Specified by:
createMBean in interface MBeanServerConnection
- Throws:
ReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
registerMBean
public ObjectInstance registerMBean(Object object,
ObjectName name)
throws InstanceAlreadyExistsException,
MBeanRegistrationException,
NotCompliantMBeanException
- Specified by:
registerMBean in interface MBeanServer
- Throws:
InstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException
unregisterMBean
public void unregisterMBean(ObjectName name)
throws InstanceNotFoundException,
MBeanRegistrationException
- Specified by:
unregisterMBean in interface MBeanServer- Specified by:
unregisterMBean in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
MBeanRegistrationException
getObjectInstance
public ObjectInstance getObjectInstance(ObjectName name)
throws InstanceNotFoundException
- Specified by:
getObjectInstance in interface MBeanServer- Specified by:
getObjectInstance in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
queryMBeans
public Set<ObjectInstance> queryMBeans(ObjectName name,
QueryExp query)
- Specified by:
queryMBeans in interface MBeanServer- Specified by:
queryMBeans in interface MBeanServerConnection
queryNames
public Set<ObjectName> queryNames(ObjectName name,
QueryExp query)
- Specified by:
queryNames in interface MBeanServer- Specified by:
queryNames in interface MBeanServerConnection
isRegistered
public boolean isRegistered(ObjectName name)
- Specified by:
isRegistered in interface MBeanServer- Specified by:
isRegistered in interface MBeanServerConnection
getMBeanCount
public Integer getMBeanCount()
- Specified by:
getMBeanCount in interface MBeanServer- Specified by:
getMBeanCount in interface MBeanServerConnection
getAttribute
public Object getAttribute(ObjectName name,
String attribute)
throws MBeanException,
AttributeNotFoundException,
InstanceNotFoundException,
ReflectionException
- Specified by:
getAttribute in interface MBeanServer- Specified by:
getAttribute in interface MBeanServerConnection
- Throws:
MBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
getAttributes
public AttributeList getAttributes(ObjectName name,
String[] attributes)
throws InstanceNotFoundException,
ReflectionException
- Specified by:
getAttributes in interface MBeanServer- Specified by:
getAttributes in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
ReflectionException
setAttribute
public void setAttribute(ObjectName name,
Attribute attribute)
throws InstanceNotFoundException,
AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException,
ReflectionException
- Specified by:
setAttribute in interface MBeanServer- Specified by:
setAttribute in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
setAttributes
public AttributeList setAttributes(ObjectName name,
AttributeList attributes)
throws InstanceNotFoundException,
ReflectionException
- Specified by:
setAttributes in interface MBeanServer- Specified by:
setAttributes in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
ReflectionException
invoke
public Object invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
throws InstanceNotFoundException,
MBeanException,
ReflectionException
- Specified by:
invoke in interface MBeanServer- Specified by:
invoke in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
MBeanException
ReflectionException
getDefaultDomain
public String getDefaultDomain()
- Specified by:
getDefaultDomain in interface MBeanServer- Specified by:
getDefaultDomain in interface MBeanServerConnection
getDomains
public String[] getDomains()
- Specified by:
getDomains in interface MBeanServer- Specified by:
getDomains in interface MBeanServerConnection
addNotificationListener
public void addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException
- Specified by:
addNotificationListener in interface MBeanServer- Specified by:
addNotificationListener in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
addNotificationListener
public void addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException
- Specified by:
addNotificationListener in interface MBeanServer- Specified by:
addNotificationListener in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
removeNotificationListener
public void removeNotificationListener(ObjectName name,
ObjectName listener)
throws InstanceNotFoundException,
ListenerNotFoundException
- Specified by:
removeNotificationListener in interface MBeanServer- Specified by:
removeNotificationListener in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException
- Specified by:
removeNotificationListener in interface MBeanServer- Specified by:
removeNotificationListener in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(ObjectName name,
NotificationListener listener)
throws InstanceNotFoundException,
ListenerNotFoundException
- Specified by:
removeNotificationListener in interface MBeanServer- Specified by:
removeNotificationListener in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException
- Specified by:
removeNotificationListener in interface MBeanServer- Specified by:
removeNotificationListener in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
ListenerNotFoundException
getMBeanInfo
public MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException,
IntrospectionException,
ReflectionException
- Specified by:
getMBeanInfo in interface MBeanServer- Specified by:
getMBeanInfo in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
IntrospectionException
ReflectionException
isInstanceOf
public boolean isInstanceOf(ObjectName name,
String className)
throws InstanceNotFoundException
- Specified by:
isInstanceOf in interface MBeanServer- Specified by:
isInstanceOf in interface MBeanServerConnection
- Throws:
InstanceNotFoundException
instantiate
public Object instantiate(String className)
throws ReflectionException,
MBeanException
- Specified by:
instantiate in interface MBeanServer
- Throws:
ReflectionException
MBeanException
instantiate
public Object instantiate(String className,
ObjectName loaderName)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
- Specified by:
instantiate in interface MBeanServer
- Throws:
ReflectionException
MBeanException
InstanceNotFoundException
instantiate
public Object instantiate(String className,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException
- Specified by:
instantiate in interface MBeanServer
- Throws:
ReflectionException
MBeanException
instantiate
public Object instantiate(String className,
ObjectName loaderName,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
- Specified by:
instantiate in interface MBeanServer
- Throws:
ReflectionException
MBeanException
InstanceNotFoundException
deserialize
public ObjectInputStream deserialize(ObjectName name,
byte[] data)
throws InstanceNotFoundException,
OperationsException
- Specified by:
deserialize in interface MBeanServer
- Throws:
InstanceNotFoundException
OperationsException
deserialize
public ObjectInputStream deserialize(String className,
byte[] data)
throws OperationsException,
ReflectionException
- Specified by:
deserialize in interface MBeanServer
- Throws:
OperationsException
ReflectionException
deserialize
public ObjectInputStream deserialize(String className,
ObjectName loaderName,
byte[] data)
throws InstanceNotFoundException,
OperationsException,
ReflectionException
- Specified by:
deserialize in interface MBeanServer
- Throws:
InstanceNotFoundException
OperationsException
ReflectionException
getClassLoaderFor
public ClassLoader getClassLoaderFor(ObjectName mbeanName)
throws InstanceNotFoundException
- Specified by:
getClassLoaderFor in interface MBeanServer
- Throws:
InstanceNotFoundException
getClassLoader
public ClassLoader getClassLoader(ObjectName loaderName)
throws InstanceNotFoundException
- Specified by:
getClassLoader in interface MBeanServer
- Throws:
InstanceNotFoundException
getClassLoaderRepository
public ClassLoaderRepository getClassLoaderRepository()
- Specified by:
getClassLoaderRepository in interface MBeanServer
Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.