private void startHttpAdaptor() {
    if (!agentConfig.isHttpEnabled()) {
      return;
    }
    try {
      ObjectName objName = getHttpAdaptorName();

      // make sure this adaptor is not already registered...
      if (getMBeanServer().isRegistered(objName)) {
        // dunno how we got here...
        logger.info("HttpAdaptor already registered as  {}", objName);
        return;
      }

      httpAdaptor = new HttpAdaptor();

      // validate and set host and port values...
      if (agentConfig.getHttpPort() > 0) {
        httpAdaptor.setPort(agentConfig.getHttpPort());
        logger.info(LogMarker.CONFIG_MARKER,
            "HTTP adaptor listening on port: {}",
            agentConfig.getHttpPort());
      } else {
        logger.error("Incorrect port value  {}",
            agentConfig.getHttpPort());
      }

      if (agentConfig.getHttpBindAddress() != null) {
        String host = agentConfig.getHttpBindAddress();
        logger.info(LogMarker.CONFIG_MARKER, "HTTP adaptor listening on address:  {}", host);
        httpAdaptor.setHost(host);
      } else {
        logger.error("Incorrect null hostname");
      }

      // SSL support...
      MX4JServerSocketFactory socketFactory =
          new MX4JServerSocketFactory(agentConfig.isAgentSSLEnabled(),
              agentConfig.isHttpSSLRequireAuth(), agentConfig.getAgentSSLProtocols(),
              agentConfig.getAgentSSLCiphers(), agentConfig.getGfSecurityProperties());
      httpAdaptor.setSocketFactory(socketFactory);

      // authentication (user login) support...
      if (agentConfig.isHttpAuthEnabled()) {
        // this pops up a login dialog from the browser...
        httpAdaptor.setAuthenticationMethod(MX4J_HTTPADAPTOR_BASIC_AUTHENTICATION); // only
                                                                                    // basic
                                                                                    // works

        httpAdaptor.addAuthorization(agentConfig.getHttpAuthUser(),
            agentConfig.getHttpAuthPassword());
      }

      // add the XsltProcessor...
      httpAdaptor.setProcessorName(createXsltProcessor());

      // register the HttpAdaptor and snap on the XsltProcessor...
      getMBeanServer().registerMBean(httpAdaptor, objName);
      httpAdaptor.start();
    } catch (VirtualMachineError err) {
      SystemFailure.initiateFailure(err);
      // If this ever returns, rethrow the error. We're poisoned
      // now, so don't let this thread continue.
      throw err;
    } catch (Throwable t) {
      // Whenever you catch Error or Throwable, you must also
      // catch VirtualMachineError (see above). However, there is
      // _still_ a possibility that you are dealing with a cascading
      // error condition, so you also need to check to see if the JVM
      // is still usable:
      SystemFailure.checkFailure();
      logger.error("Failed to start HttpAdaptor:  {}", t.getMessage());
      throw new StartupException(String.format("Failed to start HttpAdaptor: %s",
          t.getMessage()), t);
    }
  }
Defines and starts the JMX Http Adaptor service from MX4J.
<p>
If {@link AgentConfig#isHttpEnabled} returns false, then this adaptor will not be started.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java