Interface EventSender
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
DefaultEventSender
public interface EventSender extends java.io.Closeable
Internal interface for a component that can deliver preformatted event data.This is separate from the public EventSender interface in the SDK that applications can use to provide a custom implementation. The latter is used as a wrapper for this one, so we do not have to expose any types from the internal events code. The public interface is simpler because it only needs to return success/failure/shutdown status; the use of the Date header is an implementation detail that is specific to the default HTTP implementation of event delivery.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EventSender.Result
Encapsulates the results of a call to an EventSender method.
-
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, as a stringeventsBaseUri
- the configured events endpoint base URI- Returns:
- a
EventSender.Result
-
-