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
  • Method Details

    • getObject

      public MeilisearchClient getObject()
      Specified by:
      getObject in interface FactoryBean<MeilisearchClient>
    • getObjectType

      public Class<? extends com.meilisearch.sdk.Client> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<MeilisearchClient>
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface InitializingBean
    • setHostUrl

      public void setHostUrl(String hostUrl)
      Set the host URL.
      Parameters:
      hostUrl - the host URL
    • setApiKey

      public void setApiKey(String apiKey)
      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

      public void setClientAgents(String[] clientAgents)
      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