Code example for InetSocketAddress

0
  protected SelendroidStandaloneServer(SelendroidConfiguration configuration, SelendroidStandaloneDriver driver)
      throws AndroidSdkException { 
    this.configuration = configuration;
    this.driver = driver;
    webServer =
        WebServers.createWebServer(Executors.newCachedThreadPool(), new InetSocketAddress(
            configuration.getPort()), URI.create("http://127.0.0.1"
            + (configuration.getPort() == 80 ? "" : (":" + configuration.getPort())) + "/"));
    init(); 
  } 
 
  public SelendroidStandaloneServer(SelendroidConfiguration configuration) throws AndroidSdkException,
      AndroidDeviceException { 
    this.configuration = configuration;
    webServer =
        WebServers.createWebServer(Executors.newCachedThreadPool(), new InetSocketAddress(
            configuration.getPort()), remoteUri(configuration.getPort()));
    driver = initializeSelendroidServer();
    init(); 
  }