Class ElasticsearchClientFactoryBean
- java.lang.Object
-
- org.apache.syncope.ext.elasticsearch.client.ElasticsearchClientFactoryBean
-
- All Implemented Interfaces:
DisposableBean
,FactoryBean<co.elastic.clients.elasticsearch.ElasticsearchClient>
public class ElasticsearchClientFactoryBean extends Object implements FactoryBean<co.elastic.clients.elasticsearch.ElasticsearchClient>, DisposableBean
SpringFactoryBean
for getting theElasticsearchClient
singleton instance.
-
-
Field Summary
-
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchClientFactoryBean(List<org.apache.http.HttpHost> hosts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
String
getApiKeyId()
String
getApiKeySecret()
co.elastic.clients.elasticsearch.ElasticsearchClient
getObject()
Class<?>
getObjectType()
String
getServiceToken()
void
setApiKeyId(String apiKeyId)
void
setApiKeySecret(String apiKeySecret)
void
setPassword(String password)
void
setServiceToken(String serviceToken)
void
setUsername(String username)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
-
-
-
Constructor Detail
-
ElasticsearchClientFactoryBean
public ElasticsearchClientFactoryBean(List<org.apache.http.HttpHost> hosts)
-
-
Method Detail
-
setUsername
public void setUsername(String username)
-
setPassword
public void setPassword(String password)
-
getServiceToken
public String getServiceToken()
-
setServiceToken
public void setServiceToken(String serviceToken)
-
getApiKeyId
public String getApiKeyId()
-
setApiKeyId
public void setApiKeyId(String apiKeyId)
-
getApiKeySecret
public String getApiKeySecret()
-
setApiKeySecret
public void setApiKeySecret(String apiKeySecret)
-
getObject
public co.elastic.clients.elasticsearch.ElasticsearchClient getObject() throws Exception
- Specified by:
getObject
in interfaceFactoryBean<co.elastic.clients.elasticsearch.ElasticsearchClient>
- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceFactoryBean<co.elastic.clients.elasticsearch.ElasticsearchClient>
-
destroy
public void destroy() throws Exception
- Specified by:
destroy
in interfaceDisposableBean
- Throws:
Exception
-
-