private final String restfulUsername;
private final String restfulPassword;
public ServalDClient(int httpPort, String restfulUsername, String restfulPassword) throws ServalDInterfaceException {
if (httpPort < 1 || httpPort > 65535)
throw new ServalDInterfaceException("invalid HTTP port number: " + httpPort);
if (restfulUsername == null)
throw new ServalDInterfaceException("invalid HTTP username");
if (restfulPassword == null)
throw new ServalDInterfaceException("invalid HTTP password");
this.httpPort = httpPort;
this.restfulUsername = restfulUsername;
this.restfulPassword = restfulPassword;
}