public class DatabaseClientFactory
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
DatabaseClientFactory.Authentication |
Deprecated.
(as of 4.0.1) use BasicAuthContext, DigestAuthContext and KerberosAuthContext classes
|
static class |
DatabaseClientFactory.BasicAuthContext |
|
static class |
DatabaseClientFactory.Bean |
A Database Client Factory Bean provides an
object for specifying configuration before creating a client to
make database requests.
|
static class |
DatabaseClientFactory.CertificateAuthContext |
|
static interface |
DatabaseClientFactory.ClientConfigurator<T> |
A ClientConfigurator provides custom
configuration for the communication library used to sending client
requests and receiving server responses.
|
static class |
DatabaseClientFactory.DigestAuthContext |
|
static interface |
DatabaseClientFactory.HandleFactoryRegistry |
A HandleFactoryRegistry associates IO
representation classes with handle factories.
|
static class |
DatabaseClientFactory.KerberosAuthContext |
|
static class |
DatabaseClientFactory.KerberosConfig |
|
static class |
DatabaseClientFactory.SAMLAuthContext |
A SAMLAuthContext is used for authorization
using SAML.
|
static interface |
DatabaseClientFactory.SecurityContext |
|
static interface |
DatabaseClientFactory.SSLHostnameVerifier |
An SSLHostnameVerifier checks whether a hostname
is acceptable during SSL authentication.
|
Modifier and Type | Method | Description |
---|---|---|
static void |
addConfigurator(DatabaseClientFactory.ClientConfigurator<?> configurator) |
Adds a listener that provides custom
configuration when a communication library is created.
|
static void |
clearHandleRegistry() |
Removes the current registered associations so
the handle registry is empty.
|
static DatabaseClientFactory.HandleFactoryRegistry |
getHandleRegistry() |
Returns the default registry with factories for
creating handles as adapters for IO representations.
|
static DatabaseClient |
newClient(java.lang.String host,
int port) |
Creates a client to access the database by means
of a REST server without any authentication.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, DatabaseClientFactory.SecurityContext securityContext) |
Creates a client to access the database by means
of a REST server.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, DatabaseClientFactory.SecurityContext securityContext,
DatabaseClient.ConnectionType connectionType) |
Creates a client to access the database by means
of a REST server.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String database) |
Creates a client to access the database by means
of a REST server without any authentication.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String database, DatabaseClientFactory.SecurityContext securityContext) |
Creates a client to access the database by means
of a REST server.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String database, DatabaseClientFactory.SecurityContext securityContext,
DatabaseClient.ConnectionType connectionType) |
Creates a client to access the database by means
of a REST server.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String user,
java.lang.String password, DatabaseClientFactory.Authentication type) |
Deprecated.
(as of 4.0.1) use
newClient(String host, int port, SecurityContext securityContext) |
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String user,
java.lang.String password, DatabaseClientFactory.Authentication type,
javax.net.ssl.SSLContext context) |
Deprecated.
(as of 4.0.1) use
newClient(String host, int port, SecurityContext securityContext) |
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String user,
java.lang.String password, DatabaseClientFactory.Authentication type,
javax.net.ssl.SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier) |
Deprecated.
(as of 4.0.1) use
newClient(String host, int port, SecurityContext securityContext) |
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String database,
java.lang.String user, java.lang.String password,
DatabaseClientFactory.Authentication type) |
Deprecated.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String database,
java.lang.String user, java.lang.String password,
DatabaseClientFactory.Authentication type,
javax.net.ssl.SSLContext context) |
Deprecated.
|
static DatabaseClient |
newClient(java.lang.String host,
int port, java.lang.String database,
java.lang.String user, java.lang.String password,
DatabaseClientFactory.Authentication type,
javax.net.ssl.SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier) |
Deprecated.
|
static void |
registerDefaultHandles() |
Initializes a handle registry with the default
associations between the content handles provided by the API and
the supported IO representation classes.
|
public static DatabaseClient newClient(java.lang.String host, int port)
host
- the host with the REST serverport
- the port for the REST serverpublic static DatabaseClient newClient(java.lang.String host, int port, java.lang.String database)
host
- the host with the REST serverport
- the port for the REST serverdatabase
- the database to access (default:
configured database for the REST server)public static DatabaseClient newClient(java.lang.String host, int port, DatabaseClientFactory.SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serversecurityContext
- the security context created
depending upon the authentication type - BasicAuthContext,
DigestAuthContext or KerberosAuthContext and communication channel
type (SSL)public static DatabaseClient newClient(java.lang.String host, int port, DatabaseClientFactory.SecurityContext securityContext, DatabaseClient.ConnectionType connectionType)
host
- the host with the REST serverport
- the port for the REST serversecurityContext
- the security context created
depending upon the authentication type - BasicAuthContext,
DigestAuthContext or KerberosAuthContext and communication channel
type (SSL)connectionType
- whether the client connects
directly to the MarkLogic host or using a gateway such as a load
balancerpublic static DatabaseClient newClient(java.lang.String host, int port, java.lang.String database, DatabaseClientFactory.SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serverdatabase
- the database to access (default:
configured database for the REST server)securityContext
- the security context created
depending upon the authentication type - BasicAuthContext,
DigestAuthContext or KerberosAuthContext and communication channel
type (SSL)public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String database, DatabaseClientFactory.SecurityContext securityContext, DatabaseClient.ConnectionType connectionType)
host
- the host with the REST serverport
- the port for the REST serverdatabase
- the database to access (default:
configured database for the REST server)securityContext
- the security context created
depending upon the authentication type - BasicAuthContext,
DigestAuthContext or KerberosAuthContext and communication channel
type (SSL)connectionType
- whether the client connects
directly to the MarkLogic host or using a gateway such as a load
balancer@Deprecated public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String user, java.lang.String password, DatabaseClientFactory.Authentication type)
newClient(String host, int port, SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serveruser
- the user with read, write, or
administrative privilegespassword
- the password for the usertype
- the type of authentication applied to the
request@Deprecated public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String database, java.lang.String user, java.lang.String password, DatabaseClientFactory.Authentication type)
newClient(String host, int port, String database, SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serverdatabase
- the database to access (default:
configured database for the REST server)user
- the user with read, write, or
administrative privilegespassword
- the password for the usertype
- the type of authentication applied to the
request@Deprecated public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String user, java.lang.String password, DatabaseClientFactory.Authentication type, javax.net.ssl.SSLContext context)
newClient(String host, int port, SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serveruser
- the user with read, write, or
administrative privilegespassword
- the password for the usertype
- the type of authentication applied to the
requestcontext
- the SSL context for authenticating with
the server@Deprecated public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String database, java.lang.String user, java.lang.String password, DatabaseClientFactory.Authentication type, javax.net.ssl.SSLContext context)
newClient(String host, int port, String database, SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serverdatabase
- the database to access (default:
configured database for the REST server)user
- the user with read, write, or
administrative privilegespassword
- the password for the usertype
- the type of authentication applied to the
requestcontext
- the SSL context for authenticating with
the server@Deprecated public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String user, java.lang.String password, DatabaseClientFactory.Authentication type, javax.net.ssl.SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier)
newClient(String host, int port, SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serveruser
- the user with read, write, or
administrative privilegespassword
- the password for the usertype
- the type of authentication applied to the
requestcontext
- the SSL context for authenticating with
the serververifier
- a callback for checking hostnames@Deprecated public static DatabaseClient newClient(java.lang.String host, int port, java.lang.String database, java.lang.String user, java.lang.String password, DatabaseClientFactory.Authentication type, javax.net.ssl.SSLContext context, DatabaseClientFactory.SSLHostnameVerifier verifier)
newClient(String host, int port, String database, SecurityContext securityContext)
host
- the host with the REST serverport
- the port for the REST serverdatabase
- the database to access (default:
configured database for the REST server)user
- the user with read, write, or
administrative privilegespassword
- the password for the usertype
- the type of authentication applied to the
requestcontext
- the SSL context for authenticating with
the serververifier
- a callback for checking hostnamespublic static DatabaseClientFactory.HandleFactoryRegistry getHandleRegistry()
public static void clearHandleRegistry()
public static void registerDefaultHandles()
public static void addConfigurator(DatabaseClientFactory.ClientConfigurator<?> configurator)
configurator
- the listener for configuring the
communication libraryOkHttpClientConfigurator
Copyright © 2013-2019 MarkLogic Corporation.