Class ElasticSearchEventEmitter
- java.lang.Object
-
- org.jbpm.event.emitters.elasticsearch.ElasticSearchEventEmitter
-
- All Implemented Interfaces:
AutoCloseable,org.jbpm.persistence.api.integration.EventEmitter
public class ElasticSearchEventEmitter extends Object implements org.jbpm.persistence.api.integration.EventEmitter
Basic ElasticSearch implementation of EventEmitter that simply pushes out data to ElasticSearch server. It performs all the operation in the background thread but does not do any intermediate data persistence, meaning it can result in data lost in case of server crashes. This event emitter expects following parameters to configure itself - via system properties- org.jbpm.event.emitters.elasticsearch.date_format - date and time format to be sent to ElasticSearch - default format is yyyy-MM-dd'T'HH:mm:ss.SSSZ
- org.jbpm.event.emitters.elasticsearch.url - location of the ElasticSearch server - defaults to http://localhost:9200
- org.jbpm.event.emitters.elasticsearch.user - optional user name for authentication to ElasticSearch server
- org.jbpm.event.emitters.elasticsearch.password - optional password for authentication to ElasticSearch server
-
-
Constructor Summary
Constructors Constructor Description ElasticSearchEventEmitter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)protected org.apache.http.impl.client.CloseableHttpClientbuildClient()protected ExecutorServicebuildExecutorService()voidclose()voiddeliver(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)voiddrop(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)org.jbpm.persistence.api.integration.EventCollectionnewCollection()
-
-
-
Method Detail
-
deliver
public void deliver(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
- Specified by:
deliverin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
apply
public void apply(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
- Specified by:
applyin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
drop
public void drop(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
- Specified by:
dropin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
newCollection
public org.jbpm.persistence.api.integration.EventCollection newCollection()
- Specified by:
newCollectionin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
buildClient
protected org.apache.http.impl.client.CloseableHttpClient buildClient()
-
buildExecutorService
protected ExecutorService buildExecutorService()
-
-