Package org.jolokia.server.detector.jee
Class JBossDetector
java.lang.Object
org.jolokia.server.detector.jee.AbstractServerDetector
org.jolokia.server.detector.jee.JBossDetector
- All Implemented Interfaces:
Comparable<org.jolokia.server.core.detector.ServerDetector>,org.jolokia.server.core.detector.ServerDetector,org.jolokia.server.core.service.api.JolokiaService<org.jolokia.server.core.detector.ServerDetector>
Detector for JBoss
- Since:
- 06.11.10
- Author:
- roland
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jolokia.server.core.service.api.JolokiaService
org.jolokia.server.core.service.api.JolokiaService.Init -
Field Summary
FieldsFields inherited from interface org.jolokia.server.core.detector.ServerDetector
FALLBACK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jolokia.server.core.service.api.ServerHandledetect(org.jolokia.server.core.util.jmx.MBeanServerAccess pMBeanServerAccess) protected intA wait (in ms) between active-loop waiting cycles.protected intIf a detector requires an active-wait loop, this is the total timeout (in ms).protected booleanisJBossModulesBasedContainer(ClassLoader classLoader) jvmAgentStartup(Instrumentation instrumentation) Attempts to detect a JBoss modules based application server.Methods inherited from class org.jolokia.server.detector.jee.AbstractServerDetector
activeWait, compareTo, destroy, equals, getAttributeValue, getAttributeValue, getClassLoaded, getConfig, getContainerLocator, getDetectionFinalDelay, getName, getOrder, getRequestInterceptor, getSingleStringAttribute, getVersionFromJsr77, hashCode, init, init, isClassLoaded, isEnabled, mBeanExists, searchMBeansMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jolokia.server.core.detector.ServerDetector
getType
-
Field Details
-
JBOSS_AS_MANAGEMENT_ROOT_SERVER
- See Also:
-
LOGGING_DETECT_TIMEOUT
public static final int LOGGING_DETECT_TIMEOUT- See Also:
-
LOGGING_DETECT_INTERVAL
public static final int LOGGING_DETECT_INTERVAL- See Also:
-
-
Constructor Details
-
JBossDetector
public JBossDetector(int pOrder) Create a server detector- Parameters:
pOrder- of the detector (within the list of detectors)
-
-
Method Details
-
detect
public org.jolokia.server.core.service.api.ServerHandle detect(org.jolokia.server.core.util.jmx.MBeanServerAccess pMBeanServerAccess) -
jvmAgentStartup
Attempts to detect a JBoss modules based application server. Because getting access to the main arguments is not possible, it returns true in case the system propertyjboss.modules.system.pkgsis set and theorg/jboss/modules/Main.classresource can be found using the class loader of this class. If so, it awaits the early initialization of a JBoss modules based application server by polling the system propertyjava.util.logging.managerand waiting until the specified class specified by this property has been loaded by the JVM.- Specified by:
jvmAgentStartupin interfaceorg.jolokia.server.core.detector.ServerDetector- Overrides:
jvmAgentStartupin classAbstractServerDetector
-
isJBossModulesBasedContainer
-
getDetectionTimeout
protected int getDetectionTimeout()Description copied from class:AbstractServerDetectorIf a detector requires an active-wait loop, this is the total timeout (in ms). If-1, it means the waiting is disabled. But given detector has to actively invoke waiting code.- Overrides:
getDetectionTimeoutin classAbstractServerDetector- Returns:
-
getDetectionInterval
protected int getDetectionInterval()Description copied from class:AbstractServerDetectorA wait (in ms) between active-loop waiting cycles.- Overrides:
getDetectionIntervalin classAbstractServerDetector- Returns:
-
getMBeanServers
Description copied from class:AbstractServerDetector- Specified by:
getMBeanServersin interfaceorg.jolokia.server.core.detector.ServerDetector- Overrides:
getMBeanServersin classAbstractServerDetector
-