Package org.nuxeo.elasticsearch.client
Class ESRestClientFactory
- java.lang.Object
-
- org.nuxeo.elasticsearch.client.ESRestClientFactory
-
- All Implemented Interfaces:
ESClientFactory
public class ESRestClientFactory extends Object implements ESClientFactory
- Since:
- 9.3
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ESRestClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckConnection(org.elasticsearch.client.RestHighLevelClient client)protected voidcheckDeprecatedProperties()protected voidcheckDeprecatedProperty(String oldProp, String newProp)ESClientcreate(ElasticSearchEmbeddedNode node, ElasticSearchClientConfig config)protected ESClientcreateLocalRestClient(ElasticSearchEmbeddedNode node)protected ESClientcreateRestClient(ElasticSearchClientConfig config)protected intgetConnectTimeoutMs(ElasticSearchClientConfig config)protected org.apache.http.impl.client.BasicCredentialsProvidergetCredentialProvider(ElasticSearchClientConfig config)protected intgetSocketTimeoutMs(ElasticSearchClientConfig config)protected SSLContextgetSslContext(ElasticSearchClientConfig config)protected KeyStoreloadKeyStore(String path, String password, String type)
-
-
-
Field Detail
-
DEFAULT_CONNECT_TIMEOUT_MS
public static final String DEFAULT_CONNECT_TIMEOUT_MS
- See Also:
- Constant Field Values
-
DEFAULT_SOCKET_TIMEOUT_MS
public static final String DEFAULT_SOCKET_TIMEOUT_MS
- See Also:
- Constant Field Values
-
CONNECTION_TIMEOUT_MS_OPT
public static final String CONNECTION_TIMEOUT_MS_OPT
- See Also:
- Constant Field Values
-
SOCKET_TIMEOUT_MS_OPT
public static final String SOCKET_TIMEOUT_MS_OPT
- See Also:
- Constant Field Values
-
AUTH_USER_OPT
public static final String AUTH_USER_OPT
- See Also:
- Constant Field Values
-
AUTH_PASSWORD_OPT
public static final String AUTH_PASSWORD_OPT
- See Also:
- Constant Field Values
-
TRUST_STORE_PATH_OPT
public static final String TRUST_STORE_PATH_OPT
- Since:
- 10.3
- See Also:
- Constant Field Values
-
TRUST_STORE_PASSWORD_OPT
public static final String TRUST_STORE_PASSWORD_OPT
- Since:
- 10.3
- See Also:
- Constant Field Values
-
TRUST_STORE_TYPE_OPT
public static final String TRUST_STORE_TYPE_OPT
- Since:
- 10.3
- See Also:
- Constant Field Values
-
KEY_STORE_PATH_OPT
public static final String KEY_STORE_PATH_OPT
- Since:
- 10.3
- See Also:
- Constant Field Values
-
KEY_STORE_PASSWORD_OPT
public static final String KEY_STORE_PASSWORD_OPT
- Since:
- 10.3
- See Also:
- Constant Field Values
-
KEY_STORE_TYPE_OPT
public static final String KEY_STORE_TYPE_OPT
- Since:
- 10.3
- See Also:
- Constant Field Values
-
DEPRECATED_TRUST_STORE_PATH_OPT
@Deprecated public static final String DEPRECATED_TRUST_STORE_PATH_OPT
Deprecated.since 10.3, misnamed, useTRUST_STORE_PATH_OPTinstead- See Also:
- Constant Field Values
-
DEPRECATED_TRUST_STORE_PASSWORD_OPT
@Deprecated public static final String DEPRECATED_TRUST_STORE_PASSWORD_OPT
Deprecated.since 10.3, misnamed, useTRUST_STORE_PATH_OPTinstead- See Also:
- Constant Field Values
-
DEPRECATED_TRUST_STORE_TYPE_OPT
@Deprecated public static final String DEPRECATED_TRUST_STORE_TYPE_OPT
Deprecated.since 10.3, misnamed, useTRUST_STORE_PATH_OPTinstead- Since:
- 9.10-HF01
- See Also:
- Constant Field Values
-
SSL_CERTIFICATE_VERIFICATION_OPT
public static final String SSL_CERTIFICATE_VERIFICATION_OPT
- Since:
- 2021.37
- See Also:
- Constant Field Values
-
DEPRECATED_ES_TRUST_STORE_PATH_PROP
protected static final String DEPRECATED_ES_TRUST_STORE_PATH_PROP
- See Also:
- Constant Field Values
-
DEPRECATED_ES_TRUST_STORE_PASSWORD_PROP
protected static final String DEPRECATED_ES_TRUST_STORE_PASSWORD_PROP
- See Also:
- Constant Field Values
-
DEPRECATED_ES_TRUST_STORE_TYPE_PROP
protected static final String DEPRECATED_ES_TRUST_STORE_TYPE_PROP
- See Also:
- Constant Field Values
-
ES_TRUST_STORE_PATH_PROP
protected static final String ES_TRUST_STORE_PATH_PROP
- See Also:
- Constant Field Values
-
ES_TRUST_STORE_PASSWORD_PROP
protected static final String ES_TRUST_STORE_PASSWORD_PROP
- See Also:
- Constant Field Values
-
ES_TRUST_STORE_TYPE_PROP
protected static final String ES_TRUST_STORE_TYPE_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public ESClient create(ElasticSearchEmbeddedNode node, ElasticSearchClientConfig config)
- Specified by:
createin interfaceESClientFactory
-
createLocalRestClient
protected ESClient createLocalRestClient(ElasticSearchEmbeddedNode node)
-
createRestClient
protected ESClient createRestClient(ElasticSearchClientConfig config)
-
getCredentialProvider
protected org.apache.http.impl.client.BasicCredentialsProvider getCredentialProvider(ElasticSearchClientConfig config)
-
getSslContext
protected SSLContext getSslContext(ElasticSearchClientConfig config)
-
checkDeprecatedProperties
protected void checkDeprecatedProperties()
-
loadKeyStore
protected KeyStore loadKeyStore(String path, String password, String type) throws GeneralSecurityException, IOException
- Throws:
GeneralSecurityExceptionIOException
-
getConnectTimeoutMs
protected int getConnectTimeoutMs(ElasticSearchClientConfig config)
-
getSocketTimeoutMs
protected int getSocketTimeoutMs(ElasticSearchClientConfig config)
-
checkConnection
protected void checkConnection(org.elasticsearch.client.RestHighLevelClient client)
-
-