public final class AMXGlassfish extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AMXGlassfish.BootAMXCallback
Callback for
MBeanListener that waits for the BootAMXMBean to appear;
it always will load early in server startup. |
Modifier and Type | Field and Description |
---|---|
static AMXGlassfish |
DEFAULT
Default domain support
|
static String |
DEFAULT_JMX_DOMAIN |
Constructor and Description |
---|
AMXGlassfish(String jmxDomain)
Anything other than
DEFAULT is not supported in Glassfish V3 |
Modifier and Type | Method and Description |
---|---|
String |
amxJMXDomain()
JMX domain used by AMX MBeans.
|
String |
amxSupportDomain()
JMX domain used by AMX support MBeans.
|
ObjectName |
bootAMX(MBeanServer server) |
ObjectName |
bootAMX(MBeanServerConnection conn)
Ensure that AMX is loaded and ready to use.
|
String |
dasConfig()
name of the Domain Admin Server (DAS) <config>
|
String |
dasName()
name of the Domain Admin Server (DAS) as found in an ObjectName
|
ObjectName |
domainRoot()
return the ObjectName of the AMX DomainRoot MBean
|
ObjectName |
getBootAMXMBeanObjectName()
ObjectName for
BootAMXMBean |
static String |
getGlassfishVersion()
Return a version string, or null if not running in Glassfish
|
void |
invokeBootAMX(MBeanServerConnection conn)
Invoke the bootAMX() method on
BootAMXMBean . |
<T extends MBeanListener.Callback> |
listenForBootAMX(MBeanServerConnection server,
T callback)
Listen for the registration of the
BootAMXMBean . |
<T extends MBeanListener.Callback> |
listenForDomainRoot(MBeanServerConnection server,
T callback)
Listen for the registration of AMX DomainRoot
Listening starts automatically.
|
ObjectName |
monitoringRoot()
ObjectName for top-level monitoring MBean (parent of those for each server)
|
ObjectName |
newObjectName(String s)
Make a new ObjectName for AMX domain with unchecked exception
|
ObjectName |
newObjectName(String pp,
String type,
String name)
Make a new AMX ObjectName with unchecked exception.
|
ObjectName |
serverMon(String serverName)
ObjectName for top-level monitoring MBean for specified server
|
ObjectName |
serverMonForDAS()
ObjectName for top-level monitoring MBean for the DAS.
|
ObjectName |
waitAMXReady(MBeanServerConnection server)
Wait until AMX has loaded and is ready for use.
|
public static final String DEFAULT_JMX_DOMAIN
public static final AMXGlassfish DEFAULT
public static String getGlassfishVersion()
public String amxJMXDomain()
All MBeans in this domain must be AMX-compliant, see http://tinyurl.com/nryoqp = https://glassfish.dev.java.net/nonav/v3/admin/planning/V3Changes/V3_AMX_SPI.html
public String amxSupportDomain()
public String dasName()
public String dasConfig()
public ObjectName domainRoot()
public ObjectName monitoringRoot()
public ObjectName serverMon(String serverName)
public ObjectName serverMonForDAS()
public ObjectName newObjectName(String pp, String type, String name)
pp
- The parent parttype
- The ObjectName typename
- The ObjectName namepublic ObjectName newObjectName(String s)
public ObjectName getBootAMXMBeanObjectName()
BootAMXMBean
public void invokeBootAMX(MBeanServerConnection conn)
BootAMXMBean
. Upon return,
AMX continues to load.
A cilent should call invokeWaitAMXReady
prior to use.public <T extends MBeanListener.Callback> MBeanListener<T> listenForDomainRoot(MBeanServerConnection server, T callback)
public ObjectName waitAMXReady(MBeanServerConnection server)
This will not cause AMX to load; it will block forever until AMX is ready. In other words, don't call this method unless it's a convenient thread that can wait forever.
public <T extends MBeanListener.Callback> MBeanListener<T> listenForBootAMX(MBeanServerConnection server, T callback)
BootAMXMBean
.
Listening starts automatically. See AMXBooter#BootAMXCallback
.public ObjectName bootAMX(MBeanServerConnection conn) throws IOException
conn
- connection to the MBeanServerIOException
public ObjectName bootAMX(MBeanServer server)
Copyright © 2017 Oracle. All rights reserved.