Top Description Inners Fields Constructors Methods
org.glassfish.external.amx

public final Class AMXGlassfish

extends Object
Class Inheritance
Imports
javax.management.ObjectName, .MBeanServer, .MBeanServerConnection, java.io.IOException

AMX behavior specific to Glassfish V3.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
AMXGlassfish.BootAMXCallback

Callback for MBeanListener that waits for the BootAMXMBean to appear; it always will load early in server startup.

private static class

Field Summary

Modifier and TypeField and Description
public static final AMXGlassfish
DEFAULT

Default domain support

public static final String
private final ObjectName
private final String

Constructor Summary

AccessConstructor and Description
public
AMXGlassfish(final String jmxDomain)

Anything other than DEFAULT is not supported in Glassfish V3

Method Summary

Modifier and TypeMethod and Description
public String
amxJMXDomain()

JMX domain used by AMX MBeans.

public String
amxSupportDomain()

JMX domain used by AMX support MBeans.

public ObjectName

Returns:

the ObjectName of the domain-root MBean
bootAMX
(final MBeanServerConnection
connection to the MBeanServer
conn
)

Ensure that AMX is loaded and ready to use.

public ObjectName
bootAMX(final MBeanServer server)

public String
dasConfig()

name of the Domain Admin Server (DAS) <config>

public String
dasName()

name of the Domain Admin Server (DAS) as found in an ObjectName

public ObjectName
domainRoot()

return the ObjectName of the AMX DomainRoot MBean

public ObjectName
public static String
getGlassfishVersion()

Return a version string, or null if not running in Glassfish

public void
invokeBootAMX(final MBeanServerConnection conn)

Invoke the bootAMX() method on BootAMXMBean.

private static void
invokeWaitAMXReady(final MBeanServerConnection conn, final ObjectName objectName)

Invoke the waitAMXReady() method on the DomainRoot MBean, which must already be loaded.

public <T extends MBeanListener.Callback> MBeanListener<T>
listenForBootAMX(final MBeanServerConnection server, final T callback)

Listen for the registration of the BootAMXMBean.

public <T extends MBeanListener.Callback> MBeanListener<T>
listenForDomainRoot(final MBeanServerConnection server, final T callback)

Listen for the registration of AMX DomainRoot Listening starts automatically.

public ObjectName
monitoringRoot()

ObjectName for top-level monitoring MBean (parent of those for each server)

public ObjectName

Returns:

The objectname with pp, type, and (optionally) name.
newObjectName
(final String
The parent part
pp
,
final String
The ObjectName type
type
,
final String
The ObjectName name
name
)

Make a new AMX ObjectName with unchecked exception.

public ObjectName
newObjectName(final String s)

Make a new ObjectName for AMX domain with unchecked exception

private static String
prop(final String key, final String value)

public ObjectName
serverMon(final String serverName)

ObjectName for top-level monitoring MBean for specified server

public ObjectName
serverMonForDAS()

ObjectName for top-level monitoring MBean for the DAS.

public ObjectName
waitAMXReady(final MBeanServerConnection server)

Wait until AMX has loaded and is ready for use.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULTback to summary
public static final AMXGlassfish DEFAULT

Default domain support

DEFAULT_JMX_DOMAINback to summary
public static final String DEFAULT_JMX_DOMAIN
mDomainRootback to summary
private final ObjectName mDomainRoot
mJMXDomainback to summary
private final String mJMXDomain

Constructor Detail

AMXGlassfishback to summary
public AMXGlassfish(final String jmxDomain)

Anything other than DEFAULT is not supported in Glassfish V3

Method Detail

amxJMXDomainback to summary
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

amxSupportDomainback to summary
public String amxSupportDomain()

JMX domain used by AMX support MBeans. Private use only

bootAMXback to summary
public ObjectName bootAMX(final 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:MBeanServerConnection

connection to the MBeanServer

Returns:ObjectName

the ObjectName of the domain-root MBean

bootAMXback to summary
public ObjectName bootAMX(final MBeanServer server)
dasConfigback to summary
public String dasConfig()

name of the Domain Admin Server (DAS) <config>

dasNameback to summary
public String dasName()

name of the Domain Admin Server (DAS) as found in an ObjectName

domainRootback to summary
public ObjectName domainRoot()

return the ObjectName of the AMX DomainRoot MBean

getBootAMXMBeanObjectNameback to summary
public ObjectName getBootAMXMBeanObjectName()

ObjectName for BootAMXMBean

getGlassfishVersionback to summary
public static String getGlassfishVersion()

Return a version string, or null if not running in Glassfish

invokeBootAMXback to summary
public void invokeBootAMX(final MBeanServerConnection conn)

Invoke the bootAMX() method on BootAMXMBean. Upon return, AMX continues to load. A cilent should call invokeWaitAMXReady prior to use.

invokeWaitAMXReadyback to summary
private static void invokeWaitAMXReady(final MBeanServerConnection conn, final ObjectName objectName)

Invoke the waitAMXReady() method on the DomainRoot MBean, which must already be loaded.

listenForBootAMXback to summary
public <T extends MBeanListener.Callback> MBeanListener<T> listenForBootAMX(final MBeanServerConnection server, final T callback)

Listen for the registration of the BootAMXMBean. Listening starts automatically.

listenForDomainRootback to summary
public <T extends MBeanListener.Callback> MBeanListener<T> listenForDomainRoot(final MBeanServerConnection server, final T callback)

Listen for the registration of AMX DomainRoot Listening starts automatically.

monitoringRootback to summary
public ObjectName monitoringRoot()

ObjectName for top-level monitoring MBean (parent of those for each server)

newObjectNameback to summary
public ObjectName newObjectName(final String pp, final String type, final 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:String

The parent part

type:String

The ObjectName type

name:String

The ObjectName name

Returns:ObjectName

The objectname with pp, type, and (optionally) name.

newObjectNameback to summary
public ObjectName newObjectName(final String s)

Make a new ObjectName for AMX domain with unchecked exception

propback to summary
private static String prop(final String key, final String value)
serverMonback to summary
public ObjectName serverMon(final String serverName)

ObjectName for top-level monitoring MBean for specified server

serverMonForDASback to summary
public ObjectName serverMonForDAS()

ObjectName for top-level monitoring MBean for the DAS.

waitAMXReadyback to summary
public ObjectName waitAMXReady(final 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.

org.glassfish.external.amx back to summary

public Class AMXGlassfish.BootAMXCallback

extends CallbackImpl
Class Inheritance

Callback for MBeanListener that waits for the BootAMXMBean to appear; it always will load early in server startup. Once it has loaded, AMX can be booted via bootAMX. A client should normally just call bootAMX, but this callback may be suclassed if desired, and used as a trigger to boot AMX and then take other dependent actions.

Field Summary

Inherited from org.glassfish.external.amx.MBeanListener.CallbackImpl:
mLatch

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.glassfish.external.amx.MBeanListener.CallbackImpl:
awaitgetRegisteredgetUnregisteredmbeanUnregistered

Constructor Detail

BootAMXCallbackback to summary
public BootAMXCallback(final MBeanServerConnection conn)

Method Detail

mbeanRegisteredback to summary
public void mbeanRegistered(final ObjectName objectName, final MBeanListener<T extends MBeanListener.Callback> listener)

Overrides org.glassfish.external.amx.MBeanListener.CallbackImpl.mbeanRegistered.

Implements org.glassfish.external.amx.MBeanListener.Callback.mbeanRegistered.

Annotations
@Override
org.glassfish.external.amx back to summary

private final Class AMXGlassfish.WaitForDomainRootListenerCallback

extends CallbackImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final MBeanServerConnection
Inherited from org.glassfish.external.amx.MBeanListener.CallbackImpl:
mLatch

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.glassfish.external.amx.MBeanListener.CallbackImpl:
awaitgetRegisteredgetUnregisteredmbeanUnregistered

Field Detail

mConnback to summary
private final MBeanServerConnection mConn

Constructor Detail

WaitForDomainRootListenerCallbackback to summary
public WaitForDomainRootListenerCallback(final MBeanServerConnection conn)

Method Detail

mbeanRegisteredback to summary
public void mbeanRegistered(final ObjectName objectName, final MBeanListener<T extends MBeanListener.Callback> listener)

Overrides org.glassfish.external.amx.MBeanListener.CallbackImpl.mbeanRegistered.

Implements org.glassfish.external.amx.MBeanListener.Callback.mbeanRegistered.

Annotations
@Override