private HttpConnectorList getHttpConnectors ( ) throws Exception { logger . info ( "Searching HTTP connectors." ) ; HttpConnectorList httpConnectorList = null ; //find Jboss first as is typical setup httpConnectorList = jBossConnectorDiscover . findConnectors ( ) ; if ( httpConnectorList == null || httpConnectorList . getConnectors ( ) . isEmpty ( ) ) { //if not found try tomcat httpConnectorList = new TomcatConnectorDiscover ( ) . findConnectors ( ) ; } return httpConnectorList ; }
Will query different JMX MBeans for a list of runtime connectors .