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>

public class JBossDetector extends AbstractServerDetector
Detector for JBoss
Since:
06.11.10
Author:
roland
  • Field Details

  • 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

      public ClassLoader jvmAgentStartup(Instrumentation instrumentation)
      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 property jboss.modules.system.pkgs is set and the org/jboss/modules/Main.class resource 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 property java.util.logging.manager and waiting until the specified class specified by this property has been loaded by the JVM.
      Specified by:
      jvmAgentStartup in interface org.jolokia.server.core.detector.ServerDetector
      Overrides:
      jvmAgentStartup in class AbstractServerDetector
    • isJBossModulesBasedContainer

      protected boolean isJBossModulesBasedContainer(ClassLoader classLoader)
    • getDetectionTimeout

      protected int getDetectionTimeout()
      Description copied from class: AbstractServerDetector
      If 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:
      getDetectionTimeout in class AbstractServerDetector
      Returns:
    • getDetectionInterval

      protected int getDetectionInterval()
      Description copied from class: AbstractServerDetector
      A wait (in ms) between active-loop waiting cycles.
      Overrides:
      getDetectionInterval in class AbstractServerDetector
      Returns:
    • getMBeanServers

      public Set<MBeanServerConnection> getMBeanServers()
      Description copied from class: AbstractServerDetector
      Specified by:
      getMBeanServers in interface org.jolokia.server.core.detector.ServerDetector
      Overrides:
      getMBeanServers in class AbstractServerDetector