public static class DatabaseClientFactory.Bean extends Object implements Serializable
For instance, a Spring configuration file might resemble the following example:
<bean name="databaseClientFactory"
class="com.marklogic.client.DatabaseClientFactory.Bean">
<property name="host" value="localhost"/>
<property name="port" value="8012"/>
<property name="user" value="rest-writer-user"/>
<property name="password" value="rest-writer-password"/>
<property name="authenticationValue" value="digest"/>
</bean>
<bean name="databaseClient"
class="com.marklogic.client.DatabaseClient"
factory-bean="databaseClientFactory"
factory-method="newClient"/>
| Constructor and Description |
|---|
DatabaseClientFactory.Bean()
Zero-argument constructor for bean applications.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearHandleRegistry()
Removes the current registered associations so the
handle registry is empty.
|
DatabaseClientFactory.Authentication |
getAuthentication()
Returns the authentication type for clients created with a
DatabaseClientFactory.Bean object.
|
SSLContext |
getContext()
Returns the SSLContext for SSL clients created with a
DatabaseClientFactory.Bean object.
|
DatabaseClientFactory.HandleFactoryRegistry |
getHandleRegistry()
Returns the registry for associating
IO representation classes with handle factories.
|
String |
getHost()
Returns the host for clients created with a
DatabaseClientFactory.Bean object.
|
String |
getPassword()
Returns the password authentication for clients created with a
DatabaseClientFactory.Bean object.
|
int |
getPort()
Returns the port for clients created with a
DatabaseClientFactory.Bean object.
|
String |
getUser()
Returns the user authentication for clients created with a
DatabaseClientFactory.Bean object.
|
DatabaseClientFactory.SSLHostnameVerifier |
getVerifier()
Returns the host verifier for clients created with a
DatabaseClientFactory.Bean object.
|
DatabaseClient |
newClient()
Creates a client for bean applications based on the properties.
|
void |
registerDefaultHandles()
Initializes a handle registry with the default associations
between the content handles provided by the API and the supported
IO representation classes.
|
void |
setAuthentication(DatabaseClientFactory.Authentication authentication)
Specifies the authentication type for clients created with a
DatabaseClientFactory.Bean object.
|
void |
setAuthenticationValue(String authentication)
Specifies the authentication type for clients created with a
DatabaseClientFactory.Bean object based on a string value.
|
void |
setContext(SSLContext context)
Specifies the SSLContext for clients created with a
DatabaseClientFactory.Bean object that authenticate with SSL.
|
void |
setHost(String host)
Specifies the host for clients created from a
DatabaseClientFactory.Bean object.
|
void |
setPassword(String password)
Specifies the password authentication for clients created with a
DatabaseClientFactory.Bean object.
|
void |
setPort(int port)
Specifies the port for clients created with a
DatabaseClientFactory.Bean object.
|
void |
setUser(String user)
Specifies the user authentication for clients created with a
DatabaseClientFactory.Bean object.
|
void |
setVerifier(DatabaseClientFactory.SSLHostnameVerifier verifier)
Specifies the host verifier for clients created with a
DatabaseClientFactory.Bean object that verify hosts for
additional security.
|
public DatabaseClientFactory.Bean()
public String getHost()
public void setHost(String host)
host - the client hostpublic int getPort()
public void setPort(int port)
port - the client portpublic String getUser()
public void setUser(String user)
user - the userpublic String getPassword()
public void setPassword(String password)
password - the passwordpublic DatabaseClientFactory.Authentication getAuthentication()
public void setAuthentication(DatabaseClientFactory.Authentication authentication)
authentication - the authentication typepublic void setAuthenticationValue(String authentication)
authentication - the authentication typepublic SSLContext getContext()
public void setContext(SSLContext context)
context - the SSL contextpublic DatabaseClientFactory.SSLHostnameVerifier getVerifier()
public void setVerifier(DatabaseClientFactory.SSLHostnameVerifier verifier)
verifier - the host verifierpublic DatabaseClientFactory.HandleFactoryRegistry getHandleRegistry()
public void clearHandleRegistry()
public void registerDefaultHandles()
public DatabaseClient newClient()
Copyright © 2013-2015 MarkLogic Corporation.