if (port == -1)
port = findPort(client);
if (port == 0) {
throw new ConfigException(L.l("HTTP listener {0}:{1} was not found",
address, port));
}
String user = args.getArg("-user");
String password = args.getArg("-password");
try {
Constructor c = scalingClientClass.getConstructor(String.class,
int.class,
String.class,
String.class);
ResinScalingClient scaingClient;
scaingClient = (ResinScalingClient) c.newInstance(address,
port,
user,
password);
return scaingClient;
} catch (Exception e) {
throw new ConfigException(e.getMessage(), e);
}
}