private void stopSnmpAdaptor() {
    if (!agentConfig.isSnmpEnabled()) {
      return;
    }

    // stop the SnmpAdaptor...
    try {
      getMBeanServer().invoke(getSnmpAdaptorName(), "unbind", new Object[0], new String[0]);
    } catch (Exception e) {
      logger.warn(e.getMessage(), e);
    }

    try {
      MBeanUtils.unregisterMBean(getSnmpAdaptorName());
    } catch (MalformedObjectNameException e) {
      logger.warn(e.getMessage(), e);
    }
  }
Stops the SnmpAdaptor and unregisters its MBean.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java