public class ElasticsearchClientFactory
extends org.springframework.beans.factory.config.AbstractFactoryBean<org.elasticsearch.client.RestHighLevelClient>
| Modifier and Type | Field and Description |
|---|---|
protected String |
password
The password for Elasticsearch
|
protected String[] |
serverUrls
List of Elasticsearch urls
|
protected String |
username
The username for Elasticsearch
|
| Constructor and Description |
|---|
ElasticsearchClientFactory(String[] serverUrls) |
| Modifier and Type | Method and Description |
|---|---|
protected org.elasticsearch.client.RestHighLevelClient |
createInstance() |
protected void |
destroyInstance(org.elasticsearch.client.RestHighLevelClient instance) |
Class<?> |
getObjectType() |
void |
setPassword(String password) |
void |
setUsername(String username) |
protected String[] serverUrls
protected String username
protected String password
public ElasticsearchClientFactory(String[] serverUrls)
public void setUsername(String username)
public void setPassword(String password)
protected org.elasticsearch.client.RestHighLevelClient createInstance()
createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.elasticsearch.client.RestHighLevelClient>protected void destroyInstance(org.elasticsearch.client.RestHighLevelClient instance)
throws Exception
destroyInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.elasticsearch.client.RestHighLevelClient>Exceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.elasticsearch.client.RestHighLevelClient>getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<org.elasticsearch.client.RestHighLevelClient>Copyright © 2020 CrafterCMS. All rights reserved.