Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: zane-neo <[email protected]>
  • Loading branch information
zane-neo committed Feb 26, 2024
1 parent 0d21732 commit b38930c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public static SdkAsyncHttpClient getAsyncHttpClient() {
}
}

/**
* Validate the input parameters, such as protocol, host and port.
* @param protocol The protocol supported in remote inference, currently only http and https are supported.
* @param host The host name of the remote inference server, host must be a valid ip address or domain name and must not be localhost.
* @param port The port number of the remote inference server, port number must be in range [0, 65536].
* @throws UnknownHostException
*/
public static void validate(String protocol, String host, int port) throws UnknownHostException {
if (protocol != null && !"http".equalsIgnoreCase(protocol) && !"https".equalsIgnoreCase(protocol)) {
log.error("Remote inference protocol is not http or https: " + protocol);
Expand Down

0 comments on commit b38930c

Please sign in to comment.