Interface BatchConsumer
-
- All Known Implementing Classes:
ElasticsearchAuditEventHandler
,JmsAuditEventHandler
,SplunkAuditEventHandler
public interface BatchConsumer
Implementation is responsible for being able to build up a batch payload and to publish that payload.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addToBatch(String topic, JsonValue event, StringBuilder payload)
Adds an audit event to a batch payload.Promise<Void,BatchException>
publishBatch(String payload)
Publishes the batch payload.
-
-
-
Method Detail
-
addToBatch
void addToBatch(String topic, JsonValue event, StringBuilder payload) throws BatchException
Adds an audit event to a batch payload.- Parameters:
topic
- event topicevent
- event JSON payloadpayload
- batch payload- Throws:
BatchException
- indicates failure to add-to-batch
-
publishBatch
Promise<Void,BatchException> publishBatch(String payload)
Publishes the batch payload.- Parameters:
payload
- batch payload- Returns:
- a simple promise encapsulating any potential batch exception
-
-