Class ElasticsearchComponent
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.component.elasticsearch.ElasticsearchComponent
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Component
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Component("elasticsearch-rest") public class ElasticsearchComponent extends org.apache.camel.support.DefaultComponent
Represents the component that managesElasticsearchEndpoint
.
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchComponent()
ElasticsearchComponent(org.apache.camel.CamelContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.camel.Endpoint
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
org.elasticsearch.client.RestClient
getClient()
int
getConnectionTimeout()
The time in ms to wait before connection will timeout.Boolean
getEnableSniffer()
Enable automatically discover nodes from a running Elasticsearch clusterBoolean
getEnableSSL()
Enable SSLString
getHostAddresses()
Comma separated list with ip:port formatted remote transport addresses to use.int
getMaxRetryTimeout()
The time in ms before retryString
getPassword()
Password for authenticateint
getSniffAfterFailureDelay()
The delay of a sniff execution scheduled after a failure (in milliseconds)int
getSnifferInterval()
The interval between consecutive ordinary sniff executions in milliseconds.int
getSocketTimeout()
The timeout in ms to wait before the socket will timeout.String
getUser()
Basic authenticate uservoid
setClient(org.elasticsearch.client.RestClient client)
To use an existing configured Elasticsearch client, instead of creating a client per endpoint.void
setConnectionTimeout(int connectionTimeout)
void
setEnableSniffer(Boolean enableSniffer)
void
setEnableSSL(Boolean enableSSL)
void
setHostAddresses(String hostAddresses)
void
setMaxRetryTimeout(int maxRetryTimeout)
void
setPassword(String password)
void
setSniffAfterFailureDelay(int sniffAfterFailureDelay)
void
setSnifferInterval(int snifferInterval)
void
setSocketTimeout(int socketTimeout)
void
setUser(String user)
-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
getClient
public org.elasticsearch.client.RestClient getClient()
-
setClient
public void setClient(org.elasticsearch.client.RestClient client)
To use an existing configured Elasticsearch client, instead of creating a client per endpoint. This allow to customize the client with specific settings.
-
getHostAddresses
public String getHostAddresses()
Comma separated list with ip:port formatted remote transport addresses to use. The ip and port options must be left blank for hostAddresses to be considered instead.
-
setHostAddresses
public void setHostAddresses(String hostAddresses)
-
getSocketTimeout
public int getSocketTimeout()
The timeout in ms to wait before the socket will timeout.
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout)
-
getConnectionTimeout
public int getConnectionTimeout()
The time in ms to wait before connection will timeout.
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
-
getUser
public String getUser()
Basic authenticate user
-
setUser
public void setUser(String user)
-
getPassword
public String getPassword()
Password for authenticate
-
setPassword
public void setPassword(String password)
-
getEnableSSL
public Boolean getEnableSSL()
Enable SSL
-
setEnableSSL
public void setEnableSSL(Boolean enableSSL)
-
getMaxRetryTimeout
public int getMaxRetryTimeout()
The time in ms before retry
-
setMaxRetryTimeout
public void setMaxRetryTimeout(int maxRetryTimeout)
-
getEnableSniffer
public Boolean getEnableSniffer()
Enable automatically discover nodes from a running Elasticsearch cluster
-
setEnableSniffer
public void setEnableSniffer(Boolean enableSniffer)
-
getSnifferInterval
public int getSnifferInterval()
The interval between consecutive ordinary sniff executions in milliseconds. Will be honoured when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions
-
setSnifferInterval
public void setSnifferInterval(int snifferInterval)
-
getSniffAfterFailureDelay
public int getSniffAfterFailureDelay()
The delay of a sniff execution scheduled after a failure (in milliseconds)
-
setSniffAfterFailureDelay
public void setSniffAfterFailureDelay(int sniffAfterFailureDelay)
-
-