Interface EventSender
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
public interface EventSender extends java.io.Closeable
Interface for a component that can deliver preformatted event data.By default, the SDK sends event data to the LaunchDarkly events service via HTTP. You may provide a different implementation of event delivery by implementing this interface-- for instance, to create a test fixture, or to store the data somewhere else.
- Since:
- 4.14.0
- See Also:
EventProcessorBuilder.eventSender(ComponentConfigurer)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EventSender.Result
Result type for event sending methods.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EventSender.Result
sendAnalyticsEvents(byte[] data, int eventCount, java.net.URI eventsBaseUri)
Attempt to deliver an analytics event data payload.EventSender.Result
sendDiagnosticEvent(byte[] data, java.net.URI eventsBaseUri)
Attempt to deliver a diagnostic event data payload.
-
-
-
Method Detail
-
sendAnalyticsEvents
EventSender.Result sendAnalyticsEvents(byte[] data, int eventCount, java.net.URI eventsBaseUri)
Attempt to deliver an analytics event data payload.This method will be called synchronously from an event delivery worker thread.
- Parameters:
data
- the preformatted JSON data, in UTF-8 encodingeventCount
- the number of individual events in the dataeventsBaseUri
- the configured events endpoint base URI- Returns:
- a
EventSender.Result
-
sendDiagnosticEvent
EventSender.Result sendDiagnosticEvent(byte[] data, java.net.URI eventsBaseUri)
Attempt to deliver a diagnostic event data payload.This method will be called synchronously from an event delivery worker thread.
- Parameters:
data
- the preformatted JSON data, in UTF-8 encodingeventsBaseUri
- the configured events endpoint base URI- Returns:
- a
EventSender.Result
-
-