private void startRMIConnectorServer() {
    if (!agentConfig.isRmiEnabled()) {
      return;
    }

    String rmiBindAddress = agentConfig.getRmiBindAddress();

    // Set RMI Stubs to use the given RMI Bind Address
    // Default bindAddress is "", if none is set - ignore if not set
    // If java.rmi.server.hostname property is specified then
    // that override is not changed
    String rmiStubServerNameKey = "java.rmi.server.hostname";
    String overrideHostName = System.getProperty(rmiStubServerNameKey);
    if ((overrideHostName == null || overrideHostName.trim().length() == 0)
        && (rmiBindAddress != null && rmiBindAddress.trim().length() != 0)) {
      System.setProperty(rmiStubServerNameKey, rmiBindAddress);
      logger.info(("Setting " + rmiStubServerNameKey + " = "
          + rmiBindAddress));
    }

    try {
      createRMIRegistry();
      ObjectName objName = getRMIConnectorServerName();

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

      /*
       * url defined as: service:jmx:protocol:sap where 1. protocol: rmi 2. sap is:
       * [host[:port]][url-path] where host: rmi-binding-address port: rmi-server-port url-path:
       * /jndi/rmi://<rmi-binding-address>:<rmi-port><JNDI_NAME>
       */
      String urlString = null;
      String connectorServerHost = "";
      int connectorServerPort = agentConfig.getRmiServerPort();
      String rmiRegistryHost = "";
      int rmiRegistryPort = agentConfig.getRmiPort();

      // Set registryHost to localhost if not specified
      // RMI stubs would use a default IP if namingHost is left empty
      if (rmiBindAddress == null || rmiBindAddress.trim().length() == 0) {
        connectorServerHost = "localhost";
        rmiRegistryHost = "";
      } else {
        connectorServerHost = applyRFC2732(rmiBindAddress);
        rmiRegistryHost = connectorServerHost;
      }

      urlString = MessageFormat.format(AgentImpl.JMX_SERVICE_URL, connectorServerHost,
          String.valueOf(connectorServerPort), rmiRegistryHost, String.valueOf(rmiRegistryPort),
          JNDI_NAME);

      logger.debug("JMX Service URL string is : \"{}\"", urlString);

      // The address of the connector
      JMXServiceURL url = new JMXServiceURL(urlString);

      Map<String, Object> env = new HashMap<>();

      RMIServerSocketFactory ssf = new MX4JServerSocketFactory(agentConfig.isAgentSSLEnabled(), // true,
          agentConfig.isAgentSSLRequireAuth(), // true,
          agentConfig.getAgentSSLProtocols(), // "any",
          agentConfig.getAgentSSLCiphers(), // "any",
          agentConfig.getRmiBindAddress(), 10, // backlog
          agentConfig.getGfSecurityProperties());
      env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, ssf);

      if (agentConfig.isAgentSSLEnabled()) {
        RMIClientSocketFactory csf = new SslRMIClientSocketFactory();
        env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, csf);
      }

      MBeanServer mbs = null; // will be set by registering w/ mbeanServer
      rmiConnector = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);

      // for cleanup
      rmiConnector.addNotificationListener(new ConnectionNotificationAdapter(),
          new ConnectionNotificationFilterImpl(), this);

      // Register the JMXConnectorServer in the MBeanServer
      getMBeanServer().registerMBean(rmiConnector, objName);

      // Start the JMXConnectorServer
      rmiConnector.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 RMIConnectorServer:", t);
      throw new StartupException(
          "Failed to start RMI service, verify RMI configuration properties", t);
    }
  }
Defines and starts the JMX RMIConnector and service.
<p>
If {@link AgentConfig#isRmiEnabled} returns false, then this adaptor will not be started.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java