|
JBossMX Parent POM 6.0.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.server.MBeanServerImpl
public class MBeanServerImpl
MBean server implementation. The MBean server behaviour can be configured by setting the following system properties:
LOADER_REPOSITORY_CLASS_PROPERTY)MBEAN_REGISTRY_CLASS_PROPERTY)REQUIRED_MODELMBEAN_CLASS_PROPERTY)DEFAULT_LOADER_REPOSITORY_CLASS).
The default registry is
(DEFAULT_MBEAN_REGISTRY_CLASS).
The RequiredModelMBean uses XMBean implementation by default
(DEFAULT_REQUIRED_MODELMBEAN_CLASS).
MBeanServer,
RequiredModelMBean,
ServerConstants,
LoaderRepository,
UnifiedLoaderRepository3,
XMBean| Field Summary | |
|---|---|
protected MBeanServer |
outer
The wrapping MBeanServer |
protected MBeanRegistry |
registry
Registry used by this server to map MBean object names to resource references. |
| Fields inherited from interface org.jboss.mx.service.ServiceConstants |
|---|
JBOSSMX_DOMAIN, JBOSSMX_XMBEAN_DTD_1_0, JBOSSMX_XMBEAN_DTD_1_1, JBOSSMX_XMBEAN_DTD_1_2, MBEAN_LOADER_DTD_1_0, PERSISTENCE_TIMER, PUBLIC_JBOSSMX_XMBEAN_DTD_1_0, PUBLIC_JBOSSMX_XMBEAN_DTD_1_1, PUBLIC_JBOSSMX_XMBEAN_DTD_1_2 |
| Constructor Summary | |
|---|---|
MBeanServerImpl(String defaultDomain,
MBeanServer outer,
MBeanServerDelegate delegate)
Creates an MBean server implementation with a given default domain name and registers the mandatory server delegate MBean to the server ( MBEAN_SERVER_DELEGATE). |
|
| Method Summary | |
|---|---|
void |
addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Adds a listener to a registered MBean. |
void |
addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
Adds a listener to a registered MBean. |
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)
|
protected MBeanRegistry |
createRegistry(String defaultDomain)
|
ObjectInputStream |
deserialize(ObjectName name,
byte[] data)
Deprecated. |
ObjectInputStream |
deserialize(String className,
byte[] data)
Deprecated. |
ObjectInputStream |
deserialize(String className,
ObjectName loaderName,
byte[] data)
Deprecated. |
Object |
getAttribute(ObjectName name,
String attribute)
|
AttributeList |
getAttributes(ObjectName name,
String[] attributes)
|
ClassLoader |
getClassLoader(ObjectName name)
|
ClassLoader |
getClassLoaderFor(ObjectName name)
|
ClassLoaderRepository |
getClassLoaderRepository()
Retrieve the classloader repository for this mbean server |
String |
getDefaultDomain()
|
String[] |
getDomains()
|
Integer |
getMBeanCount()
|
MBeanInfo |
getMBeanInfo(ObjectName name)
|
ObjectInstance |
getObjectInstance(ObjectName name)
|
protected void |
handleInstantiateExceptions(Throwable t,
String className)
Handles errors thrown during class instantiation |
Object |
instantiate(String className)
|
protected Object |
instantiate(String className,
ClassLoader cl,
Object[] params,
String[] signature)
Instantiate an object, the passed classloader is set as the thread's context classloader for the duration of this method. |
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)
|
boolean |
isRegistered(ObjectName name)
|
protected boolean |
queryMBean(ObjectName objectName,
QueryExp queryExp)
Query an MBean against the query |
Set |
queryMBeans(ObjectName name,
QueryExp query)
|
Set |
queryNames(ObjectName name,
QueryExp query)
|
ObjectInstance |
registerMBean(Object object,
ObjectName name)
Registers a pre-existing object as an MBean with the MBean server. |
protected ObjectInstance |
registerMBean(Object object,
ObjectName name,
ClassLoader cl)
Register an MBean |
protected ObjectInstance |
registerMBean(Object mbean,
ObjectName name,
ObjectName loaderName)
Register an MBean |
void |
releaseServer()
|
void |
removeNotificationListener(ObjectName name,
NotificationListener listener)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(ObjectName name,
ObjectName listener)
Removes a listener from a registered MBean. |
void |
removeNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
Removes a listener from a registered MBean. |
void |
setAttribute(ObjectName name,
Attribute attribute)
|
AttributeList |
setAttributes(ObjectName name,
AttributeList attributes)
|
String |
toString()
Simple toString() revealing default domain |
void |
unregisterMBean(ObjectName name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MBeanServer outer
protected MBeanRegistry registry
| Constructor Detail |
|---|
public MBeanServerImpl(String defaultDomain,
MBeanServer outer,
MBeanServerDelegate delegate)
MBEAN_SERVER_DELEGATE).
defaultDomain - default domain nameouter - the wrapping MBeanServer, passed to MBeans
at registration.delegate - the delegate to use
for Notifications.| Method Detail |
|---|
public Object instantiate(String className)
throws ReflectionException,
MBeanException
instantiate in interface MBeanServerReflectionException
MBeanException
public Object instantiate(String className,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException
instantiate in interface MBeanServerReflectionException
MBeanException
public Object instantiate(String className,
ObjectName loaderName)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
instantiate in interface MBeanServerReflectionException
MBeanException
InstanceNotFoundException
public Object instantiate(String className,
ObjectName loaderName,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
instantiate in interface MBeanServerReflectionException
MBeanException
InstanceNotFoundException
public ObjectInstance createMBean(String className,
ObjectName name)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
public ObjectInstance createMBean(String className,
ObjectName name,
Object[] params,
String[] signature)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
public ObjectInstance createMBean(String className,
ObjectName name,
ObjectName loaderName)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
public ObjectInstance createMBean(String className,
ObjectName name,
ObjectName loaderName,
Object[] params,
String[] signature)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException
createMBean in interface MBeanServercreateMBean in interface MBeanServerConnectionReflectionException
InstanceAlreadyExistsException
MBeanRegistrationException
MBeanException
NotCompliantMBeanException
InstanceNotFoundException
public ObjectInstance registerMBean(Object object,
ObjectName name)
throws InstanceAlreadyExistsException,
MBeanRegistrationException,
NotCompliantMBeanException
registerMBean in interface MBeanServerInstanceAlreadyExistsException
MBeanRegistrationException
NotCompliantMBeanException
public void unregisterMBean(ObjectName name)
throws InstanceNotFoundException,
MBeanRegistrationException
unregisterMBean in interface MBeanServerunregisterMBean in interface MBeanServerConnectionInstanceNotFoundException
MBeanRegistrationException
public ObjectInstance getObjectInstance(ObjectName name)
throws InstanceNotFoundException
getObjectInstance in interface MBeanServergetObjectInstance in interface MBeanServerConnectionInstanceNotFoundException
public Set queryMBeans(ObjectName name,
QueryExp query)
queryMBeans in interface MBeanServerqueryMBeans in interface MBeanServerConnection
public Set queryNames(ObjectName name,
QueryExp query)
queryNames in interface MBeanServerqueryNames in interface MBeanServerConnectionpublic boolean isRegistered(ObjectName name)
isRegistered in interface MBeanServerisRegistered in interface MBeanServerConnectionpublic Integer getMBeanCount()
getMBeanCount in interface MBeanServergetMBeanCount in interface MBeanServerConnection
public Object getAttribute(ObjectName name,
String attribute)
throws MBeanException,
AttributeNotFoundException,
InstanceNotFoundException,
ReflectionException
getAttribute in interface MBeanServergetAttribute in interface MBeanServerConnectionMBeanException
AttributeNotFoundException
InstanceNotFoundException
ReflectionException
public AttributeList getAttributes(ObjectName name,
String[] attributes)
throws InstanceNotFoundException,
ReflectionException
getAttributes in interface MBeanServergetAttributes in interface MBeanServerConnectionInstanceNotFoundException
ReflectionException
public void setAttribute(ObjectName name,
Attribute attribute)
throws InstanceNotFoundException,
AttributeNotFoundException,
InvalidAttributeValueException,
MBeanException,
ReflectionException
setAttribute in interface MBeanServersetAttribute in interface MBeanServerConnectionInstanceNotFoundException
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
public AttributeList setAttributes(ObjectName name,
AttributeList attributes)
throws InstanceNotFoundException,
ReflectionException
setAttributes in interface MBeanServersetAttributes in interface MBeanServerConnectionInstanceNotFoundException
ReflectionException
public Object invoke(ObjectName name,
String operationName,
Object[] params,
String[] signature)
throws InstanceNotFoundException,
MBeanException,
ReflectionException
invoke in interface MBeanServerinvoke in interface MBeanServerConnectionInstanceNotFoundException
MBeanException
ReflectionException
public MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException,
IntrospectionException,
ReflectionException
getMBeanInfo in interface MBeanServergetMBeanInfo in interface MBeanServerConnectionInstanceNotFoundException
IntrospectionException
ReflectionExceptionpublic String getDefaultDomain()
getDefaultDomain in interface MBeanServergetDefaultDomain in interface MBeanServerConnectionpublic String[] getDomains()
getDomains in interface MBeanServergetDomains in interface MBeanServerConnection
public void addNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException
addNotificationListener in interface MBeanServeraddNotificationListener in interface MBeanServerConnectionInstanceNotFoundException
public void addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException
addNotificationListener in interface MBeanServeraddNotificationListener in interface MBeanServerConnectionInstanceNotFoundException
public void removeNotificationListener(ObjectName name,
NotificationListener listener)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundException
ListenerNotFoundException
public void removeNotificationListener(ObjectName name,
ObjectName listener)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundException
ListenerNotFoundException
public void removeNotificationListener(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundException
ListenerNotFoundException
public void removeNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
ListenerNotFoundException
removeNotificationListener in interface MBeanServerremoveNotificationListener in interface MBeanServerConnectionInstanceNotFoundException
ListenerNotFoundException
public boolean isInstanceOf(ObjectName name,
String className)
throws InstanceNotFoundException
isInstanceOf in interface MBeanServerisInstanceOf in interface MBeanServerConnectionInstanceNotFoundException
public ObjectInputStream deserialize(ObjectName name,
byte[] data)
throws InstanceNotFoundException,
OperationsException
deserialize in interface MBeanServerInstanceNotFoundException
OperationsException
public ObjectInputStream deserialize(String className,
byte[] data)
throws OperationsException,
ReflectionException
deserialize in interface MBeanServerOperationsException
ReflectionException
public ObjectInputStream deserialize(String className,
ObjectName loaderName,
byte[] data)
throws InstanceNotFoundException,
OperationsException,
ReflectionException
deserialize in interface MBeanServerInstanceNotFoundException
OperationsException
ReflectionException
public ClassLoader getClassLoaderFor(ObjectName name)
throws InstanceNotFoundException
getClassLoaderFor in interface MBeanServerInstanceNotFoundException
public ClassLoader getClassLoader(ObjectName name)
throws InstanceNotFoundException
getClassLoader in interface MBeanServername - The ObjectName of the ClassLoader. May be null, in which case
the MBean server's own ClassLoader is returned.
InstanceNotFoundExceptionpublic ClassLoaderRepository getClassLoaderRepository()
getClassLoaderRepository in interface MBeanServerpublic void releaseServer()
protected Object instantiate(String className,
ClassLoader cl,
Object[] params,
String[] signature)
throws ReflectionException,
MBeanException
className - the class name of the object to instantiatecl - the thread classloader, pass null to use the ClassLoaderRepositoryparams - the parameters for the constructorsignature - the signature of the constructor
ReflectionException - wraps a ClassCastException or
any Exception trying to invoke the constructor
MBeanException - wraps any exception thrown by the constructor
RuntimeOperationsException - Wraps an IllegalArgument for a
null className
protected void handleInstantiateExceptions(Throwable t,
String className)
throws ReflectionException,
MBeanException
t - className -
ReflectionException
MBeanException
protected ObjectInstance registerMBean(Object mbean,
ObjectName name,
ObjectName loaderName)
throws ReflectionException,
InstanceAlreadyExistsException,
MBeanRegistrationException,
MBeanException,
NotCompliantMBeanException,
InstanceNotFoundException
The classloader is used as the thread context classloader during access to the mbean and it's interceptors
mbean - the mbean to registername - the object name to registerloaderName - the object name of a class loader also used as
as the MBeans TCL
ReflectionException
InstanceAlreadyExistsException - when already registered
MBeanRegistrationException - when
preRegister(MBeanServer, ObjectName) throws an exception
MBeanException
NotCompliantMBeanException - when the object is not an MBean
InstanceNotFoundException
protected ObjectInstance registerMBean(Object object,
ObjectName name,
ClassLoader cl)
throws InstanceAlreadyExistsException,
MBeanRegistrationException,
NotCompliantMBeanException
The classloader is used as the thread context classloader during access to the mbean and it's interceptors
object - the mbean to registername - the object name to registercl - the thread classloader, pass null for the current one
InstanceAlreadyExistsException - when already registered
MBeanRegistrationException - when
preRegister(MBeanServer, ObjectName) throws an exception
NotCompliantMBeanException - when the object is not an MBean
protected boolean queryMBean(ObjectName objectName,
QueryExp queryExp)
objectName - the object name of the mbean to checkqueryExp - the query expression to test
protected MBeanRegistry createRegistry(String defaultDomain)
public String toString()
toString in class Object
|
JBossMX Parent POM 6.0.0.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||