Package org.glassfish.external.amx
Class AMXGlassfish
- java.lang.Object
-
- org.glassfish.external.amx.AMXGlassfish
-
public final class AMXGlassfish extends Object
AMX behavior specific to Glassfish V3.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AMXGlassfish.BootAMXCallback
Callback forMBeanListener
that waits for the BootAMXMBean to appear; it always will load early in server startup.
-
Field Summary
Fields Modifier and Type Field Description static AMXGlassfish
DEFAULT
Default domain supportstatic String
DEFAULT_JMX_DOMAIN
-
Constructor Summary
Constructors Constructor Description AMXGlassfish(String jmxDomain)
Anything other thanDEFAULT
is not supported in Glassfish V3
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 ObjectNameObjectName
domainRoot()
return the ObjectName of the AMX DomainRoot MBeanObjectName
getBootAMXMBeanObjectName()
ObjectName forBootAMXMBean
static String
getGlassfishVersion()
Return a version string, or null if not running in Glassfishvoid
invokeBootAMX(MBeanServerConnection conn)
Invoke the bootAMX() method onBootAMXMBean
.<T extends MBeanListener.Callback>
MBeanListener<T>listenForBootAMX(MBeanServerConnection server, T callback)
Listen for the registration of theBootAMXMBean
.<T extends MBeanListener.Callback>
MBeanListener<T>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 exceptionObjectName
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 serverObjectName
serverMonForDAS()
ObjectName for top-level monitoring MBean for the DAS.ObjectName
waitAMXReady(MBeanServerConnection server)
Wait until AMX has loaded and is ready for use.
-
-
-
Field Detail
-
DEFAULT_JMX_DOMAIN
public static final String DEFAULT_JMX_DOMAIN
- See Also:
- Constant Field Values
-
DEFAULT
public static final AMXGlassfish DEFAULT
Default domain support
-
-
Method Detail
-
getGlassfishVersion
public static String getGlassfishVersion()
Return a version string, or null if not running in Glassfish
-
amxJMXDomain
public String amxJMXDomain()
JMX domain used by AMX MBeans.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
-
amxSupportDomain
public String amxSupportDomain()
JMX domain used by AMX support MBeans. Private use only
-
dasName
public String dasName()
name of the Domain Admin Server (DAS) as found in an ObjectName
-
dasConfig
public String dasConfig()
name of the Domain Admin Server (DAS) <config>
-
domainRoot
public ObjectName domainRoot()
return the ObjectName of the AMX DomainRoot MBean
-
monitoringRoot
public ObjectName monitoringRoot()
ObjectName for top-level monitoring MBean (parent of those for each server)
-
serverMon
public ObjectName serverMon(String serverName)
ObjectName for top-level monitoring MBean for specified server
-
serverMonForDAS
public ObjectName serverMonForDAS()
ObjectName for top-level monitoring MBean for the DAS.
-
newObjectName
public ObjectName newObjectName(String pp, String type, String name)
Make a new AMX ObjectName with unchecked exception. name must be null to create a singleton ObjectName. Note that the arguments must not contain the characters- Parameters:
pp
- The parent parttype
- The ObjectName typename
- The ObjectName name- Returns:
- The objectname with pp, type, and (optionally) name.
-
newObjectName
public ObjectName newObjectName(String s)
Make a new ObjectName for AMX domain with unchecked exception
-
getBootAMXMBeanObjectName
public ObjectName getBootAMXMBeanObjectName()
ObjectName forBootAMXMBean
-
invokeBootAMX
public void invokeBootAMX(MBeanServerConnection conn)
Invoke the bootAMX() method onBootAMXMBean
. Upon return, AMX continues to load. A cilent should callinvokeWaitAMXReady(javax.management.MBeanServerConnection, javax.management.ObjectName)
prior to use.
-
listenForDomainRoot
public <T extends MBeanListener.Callback> MBeanListener<T> listenForDomainRoot(MBeanServerConnection server, T callback)
Listen for the registration of AMX DomainRoot Listening starts automatically.
-
waitAMXReady
public ObjectName waitAMXReady(MBeanServerConnection server)
Wait until AMX has loaded and is ready for use.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.
-
listenForBootAMX
public <T extends MBeanListener.Callback> MBeanListener<T> listenForBootAMX(MBeanServerConnection server, T callback)
Listen for the registration of theBootAMXMBean
. Listening starts automatically.
-
bootAMX
public ObjectName bootAMX(MBeanServerConnection conn) throws IOException
Ensure that AMX is loaded and ready to use. This method returns only when all AMX subsystems have been loaded. It can be called more than once without ill effect, subsequent calls are ignored.- Parameters:
conn
- connection to the MBeanServer- Returns:
- the ObjectName of the domain-root MBean
- Throws:
IOException
-
bootAMX
public ObjectName bootAMX(MBeanServer server)
-
-