Event Adapter
Contract for a destination that receives events. Implementations may deliver immediately (in-process SDKs) or batch over the network.
Implementation requirements
Safe to invoke from a single background thread. The dispatcher serializes calls per adapter instance, so adapters do not need to be reentrant.
Never throw to the caller. Wrap exceptions and return a DeliveryOutcome instead.
Idempotent: the same event may be delivered more than once if the library cannot distinguish a successful delivery (e.g. timeout after the server received the request).
Since
1.0.0
See also
Inheritors
Properties
Functions
Decide whether this adapter wants the given event.
Deliver a single event. Realtime adapters forward to their SDK here; batch adapters typically return DeliveryOutcome.Success immediately (the event is already persisted).
Called when in.singhangad.eventtracker.EventTracker.flush is invoked. Batch adapters should drain their queue here. Default is a no-op.
Called once during in.singhangad.eventtracker.EventTracker.initialize. Use this to initialise any underlying SDK, open connections, or set up resources.