/** * Creates a client to access the database by means of a REST server. * * @param host the host with the REST server * @param port the port for the REST server * @param user the user with read, write, or administrative privileges * @param password the password for the user * @param type the type of authentication applied to the request * @param context the SSL context for authenticating with the server * @param verifier a callback for checking hostnames * @return a new client for making database requests */ static public DatabaseClient newClient(String host, int port, String user, String password, Authentication type, SSLContext context, SSLHostnameVerifier verifier) { DatabaseClientImpl client = newClientImpl(host, port, user, password, type, context, verifier); client.setHandleRegistry(getHandleRegistry().copy()); return client; } static private DatabaseClientImpl newClientImpl(String host, int port, String user, String password, Authentication type, SSLContext context, SSLHostnameVerifier verifier) {