|
Préférences
Moteurs de recherche
|
||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.6.0
javax.management
|
Method Summary | |
---|---|
static MBeanServer |
createMBeanServer()
Return a new object implementing the MBeanServer interface with a standard default domain name. |
static MBeanServer |
createMBeanServer(String domain)
Return a new object implementing the MBeanServer
interface with the specified default domain name. |
static ArrayList<MBeanServer> |
findMBeanServer(String agentId)
Return a list of registered MBeanServer objects. |
static ClassLoaderRepository |
getClassLoaderRepository(MBeanServer server)
Return the ClassLoaderRepository used by the given MBeanServer. |
static MBeanServer |
newMBeanServer()
Return a new object implementing the MBeanServer interface with a standard default domain name, without keeping an internal reference to this new object. |
static MBeanServer |
newMBeanServer(String domain)
Return a new object implementing the MBeanServer interface with the specified default domain name, without keeping an internal reference to this new object. |
static void |
releaseMBeanServer(MBeanServer mbeanServer)
Remove internal MBeanServerFactory references to a created MBeanServer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void releaseMBeanServer(MBeanServer mbeanServer)
mbeanServer
- the MBeanServer object to remove.
IllegalArgumentException
- if
mbeanServer
was not generated by one of the
createMBeanServer
methods, or if
releaseMBeanServer
was already called on it.
SecurityException
- if there is a SecurityManager and
the caller's permissions do not include or imply MBeanServerPermission
("releaseMBeanServer")
.public static MBeanServer createMBeanServer()
Return a new object implementing the MBeanServer interface with a standard default domain name. The default domain name is used as the domain part in the ObjectName of MBeans when the domain is specified by the user is null.
The standard default domain name is
DefaultDomain
.
The MBeanServer reference is internally kept. This will
allow findMBeanServer
to return a reference to
this MBeanServer object.
This method is equivalent to createMBeanServer(null)
.
SecurityException
- if there is a SecurityManager and the
caller's permissions do not include or imply MBeanServerPermission
("createMBeanServer")
.
JMRuntimeException
- if the property
javax.management.builder.initial
exists but the
class it names cannot be instantiated through a public
no-argument constructor; or if the instantiated builder returns
null from its newMBeanServerDelegate
or newMBeanServer
methods.
ClassCastException
- if the property
javax.management.builder.initial
exists and can be
instantiated but is not assignment compatible with MBeanServerBuilder
.public static MBeanServer createMBeanServer(String domain)
Return a new object implementing the MBeanServer
interface with the specified default domain name. The given
domain name is used as the domain part in the ObjectName of
MBeans when the domain is specified by the user is null.
The MBeanServer reference is internally kept. This will
allow findMBeanServer
to return a reference to
this MBeanServer object.
domain
- the default domain name for the created
MBeanServer. This is the value that will be returned by MBeanServer.getDefaultDomain()
.
SecurityException
- if there is a SecurityManager and
the caller's permissions do not include or imply MBeanServerPermission
("createMBeanServer")
.
JMRuntimeException
- if the property
javax.management.builder.initial
exists but the
class it names cannot be instantiated through a public
no-argument constructor; or if the instantiated builder returns
null from its newMBeanServerDelegate
or newMBeanServer
methods.
ClassCastException
- if the property
javax.management.builder.initial
exists and can be
instantiated but is not assignment compatible with MBeanServerBuilder
.public static MBeanServer newMBeanServer()
Return a new object implementing the MBeanServer interface with a standard default domain name, without keeping an internal reference to this new object. The default domain name is used as the domain part in the ObjectName of MBeans when the domain is specified by the user is null.
The standard default domain name is
DefaultDomain
.
No reference is kept. findMBeanServer
will not
be able to return a reference to this MBeanServer object, but
the garbage collector will be able to remove the MBeanServer
object when it is no longer referenced.
This method is equivalent to newMBeanServer(null)
.
SecurityException
- if there is a SecurityManager and the
caller's permissions do not include or imply MBeanServerPermission
("newMBeanServer")
.
JMRuntimeException
- if the property
javax.management.builder.initial
exists but the
class it names cannot be instantiated through a public
no-argument constructor; or if the instantiated builder returns
null from its newMBeanServerDelegate
or newMBeanServer
methods.
ClassCastException
- if the property
javax.management.builder.initial
exists and can be
instantiated but is not assignment compatible with MBeanServerBuilder
.public static MBeanServer newMBeanServer(String domain)
Return a new object implementing the MBeanServer interface with the specified default domain name, without keeping an internal reference to this new object. The given domain name is used as the domain part in the ObjectName of MBeans when the domain is specified by the user is null.
No reference is kept. findMBeanServer
will not
be able to return a reference to this MBeanServer object, but
the garbage collector will be able to remove the MBeanServer
object when it is no longer referenced.
domain
- the default domain name for the created
MBeanServer. This is the value that will be returned by MBeanServer.getDefaultDomain()
.
SecurityException
- if there is a SecurityManager and the
caller's permissions do not include or imply MBeanServerPermission
("newMBeanServer")
.
JMRuntimeException
- if the property
javax.management.builder.initial
exists but the
class it names cannot be instantiated through a public
no-argument constructor; or if the instantiated builder returns
null from its newMBeanServerDelegate
or newMBeanServer
methods.
ClassCastException
- if the property
javax.management.builder.initial
exists and can be
instantiated but is not assignment compatible with MBeanServerBuilder
.public static ArrayList<MBeanServer> findMBeanServer(String agentId)
Return a list of registered MBeanServer objects. A
registered MBeanServer object is one that was created by one of
the createMBeanServer
methods and not subsequently
released with releaseMBeanServer
.
agentId
- The agent identifier of the MBeanServer to
retrieve. If this parameter is null, all registered
MBeanServers in this JVM are returned. Otherwise, only
MBeanServers whose id is equal to agentId
are
returned. The id of an MBeanServer is the
MBeanServerId
attribute of its delegate MBean.
SecurityException
- if there is a SecurityManager and the
caller's permissions do not include or imply MBeanServerPermission
("findMBeanServer")
.public static ClassLoaderRepository getClassLoaderRepository(MBeanServer server)
server.getClassLoaderRepository()
.
server
- The MBeanServer under examination. Since JMX 1.2,
if server
is null
, the result is a
NullPointerException
. This behavior differs from what
was implemented in JMX 1.1 - where the possibility to use
null
was deprecated.
SecurityException
- if there is a SecurityManager and
the caller's permissions do not include or imply MBeanPermission
("getClassLoaderRepository")
.
NullPointerException
- if server
is null.