public static DomainControllerClientConfig create(final ExecutorService executorService) throws IOException {
return create(executorService, false);
}
static DomainControllerClientConfig create(final ExecutorService executorService, boolean destroyExecutor) throws IOException {
final Endpoint endpoint = Remoting.createEndpoint(ENDPOINT_NAME, OptionMap.EMPTY);
endpoint.addConnectionProvider("remote", new RemoteConnectionProviderFactory(), OptionMap.EMPTY);
return new DomainControllerClientConfig(endpoint, executorService, destroyExecutor);
}