Class MeilisearchClientFactoryBean
java.lang.Object
io.vanslog.spring.data.meilisearch.client.MeilisearchClientFactoryBean
- All Implemented Interfaces:
FactoryBean<MeilisearchClient>,InitializingBean
public final class MeilisearchClientFactoryBean
extends Object
implements FactoryBean<MeilisearchClient>, InitializingBean
FactoryBean class that creates a
MeilisearchClient. The Meilisearch
client is created by setting the host URL, API key, JSON handler, and client agents.- Author:
- Junghoon Ban
- See Also:
-
Client
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Method Summary
Modifier and TypeMethodDescriptionvoidClass<? extends com.meilisearch.sdk.Client>voidSet the API key.voidsetClientAgents(String[] clientAgents) Set the client agents.voidsetHostUrl(String hostUrl) Set the host URL.voidsetJsonHandler(com.meilisearch.sdk.json.JsonHandler jsonHandler) Set the JSON handler.voidsetRequestInterval(int requestInterval) Set request interval to wait for task to complete.voidsetRequestTimeout(int requestTimeout) Set request timeout to wait for task to complete.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Method Details
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<MeilisearchClient>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<MeilisearchClient>
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
setHostUrl
Set the host URL.- Parameters:
hostUrl- the host URL
-
setApiKey
Set the API key.- Parameters:
apiKey- the API key
-
setJsonHandler
public void setJsonHandler(com.meilisearch.sdk.json.JsonHandler jsonHandler) Set the JSON handler.- Parameters:
jsonHandler- the JSON handler
-
setClientAgents
Set the client agents.- Parameters:
clientAgents- the client agents
-
setRequestTimeout
public void setRequestTimeout(int requestTimeout) Set request timeout to wait for task to complete.- Parameters:
requestTimeout- in milliseconds
-
setRequestInterval
public void setRequestInterval(int requestInterval) Set request interval to wait for task to complete.- Parameters:
requestInterval- in milliseconds
-