Package org.glassfish.external.amx
Class AMXGlassfish
java.lang.Object
org.glassfish.external.amx.AMXGlassfish
AMX behavior specific to Glassfish V3.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Callback forMBeanListener
that waits for the BootAMXMBean to appear; it always will load early in server startup.private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AMXGlassfish
Default domain supportstatic final String
private final ObjectName
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionAMXGlassfish
(String jmxDomain) Anything other thanDEFAULT
is not supported in Glassfish V3 -
Method Summary
Modifier and TypeMethodDescriptionJMX domain used by AMX MBeans.JMX domain used by AMX support MBeans.bootAMX
(MBeanServer server) bootAMX
(MBeanServerConnection conn) Ensure that AMX is loaded and ready to use.name of the Domain Admin Server (DAS) <config>dasName()
name of the Domain Admin Server (DAS) as found in an ObjectNamereturn the ObjectName of the AMX DomainRoot MBeanObjectName forBootAMXMBean
static String
Return a version string, or null if not running in Glassfishvoid
Invoke the bootAMX() method onBootAMXMBean
.private static void
invokeWaitAMXReady
(MBeanServerConnection conn, ObjectName objectName) Invoke the waitAMXReady() method on the DomainRoot MBean, which must already be loaded.<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 for top-level monitoring MBean (parent of those for each server)Make a new ObjectName for AMX domain with unchecked exceptionnewObjectName
(String pp, String type, String name) Make a new AMX ObjectName with unchecked exception.private static String
ObjectName for top-level monitoring MBean for specified serverObjectName for top-level monitoring MBean for the DAS.waitAMXReady
(MBeanServerConnection server) Wait until AMX has loaded and is ready for use.
-
Field Details
-
DEFAULT_JMX_DOMAIN
- See Also:
-
DEFAULT
Default domain support -
mJMXDomain
-
mDomainRoot
-
-
Constructor Details
-
AMXGlassfish
Anything other thanDEFAULT
is not supported in Glassfish V3
-
-
Method Details
-
getGlassfishVersion
Return a version string, or null if not running in Glassfish -
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
JMX domain used by AMX support MBeans. Private use only -
dasName
name of the Domain Admin Server (DAS) as found in an ObjectName -
dasConfig
name of the Domain Admin Server (DAS) <config> -
domainRoot
return the ObjectName of the AMX DomainRoot MBean -
monitoringRoot
ObjectName for top-level monitoring MBean (parent of those for each server) -
serverMon
ObjectName for top-level monitoring MBean for specified server -
serverMonForDAS
ObjectName for top-level monitoring MBean for the DAS. -
newObjectName
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
Make a new ObjectName for AMX domain with unchecked exception -
prop
-
getBootAMXMBeanObjectName
ObjectName forBootAMXMBean
-
invokeBootAMX
Invoke the bootAMX() method onBootAMXMBean
. Upon return, AMX continues to load. A cilent should callinvokeWaitAMXReady(javax.management.MBeanServerConnection, javax.management.ObjectName)
prior to use. -
invokeWaitAMXReady
Invoke the waitAMXReady() method on the DomainRoot MBean, which must already be loaded. -
listenForDomainRoot
public <T extends MBeanListener.Callback> MBeanListener<T> listenForDomainRoot(MBeanServerConnection server, T callback) Listen for the registration of AMX DomainRoot Listening starts automatically. -
waitAMXReady
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
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
-