protected boolean isRegistered() {
    try {
      URL hubProxyApiUrl = new URL(hub.getProtocol(), hub.getHost(), hub.getPort(), "/grid/api/proxy");
      HttpResponse response = getHttpClient().execute(getHttpHost(), new BasicHttpRequest("GET",
              hubProxyApiUrl.toExternalForm() + "?id=http://" + config.getServerHost() + ":" + config.getPort()));

      if (response.getStatusLine().getStatusCode() != 200) {
        throw new RuntimeException("Hub is down or not responding. Response was: " + response.getStatusLine().toString());
      }

      GridResponse gridResponse = new Gson().fromJson(EntityUtils.toString(response.getEntity()), GridResponse.class);
      return gridResponse.success;
    } catch (IOException e) {
      throw new SelendroidException("Hub is down or not responding.", e);
    }
  }
Extracts the configuration.

@return The configuration
@throws JSONException On JSON errors.
selendroid-standalone/src/main/java/io/selendroid/standalone/server/grid/SelfRegisteringRemote.java