Interface EventProcessor

  • All Known Implementing Classes:
    DefaultEventProcessor

    public interface EventProcessor
    Interface describing the DefaultEventProcessor methods. There will normally only ever be one implementation of this, but having an interface allows for mocking in tests.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flushAsync()
      Schedules an asynchronous flush.
      void flushBlocking()
      Flushes and blocks until the flush is done.
      void sendEvent​(Event e)
      Enqueues an event.
      void setInBackground​(boolean inBackground)
      Tells the event processor whether we should be in background mode.
      void setOffline​(boolean offline)
      Tells the event processor whether we should be in background mode.
    • Method Detail

      • sendEvent

        void sendEvent​(Event e)
        Enqueues an event.
        Parameters:
        e - the input data
      • flushAsync

        void flushAsync()
        Schedules an asynchronous flush.
      • flushBlocking

        void flushBlocking()
        Flushes and blocks until the flush is done.
      • setInBackground

        void setInBackground​(boolean inBackground)
        Tells the event processor whether we should be in background mode. This is only applicable in the client-side (Android) SDK. In background mode, events mostly work the same but we do not send any periodic diagnostic events.
        Parameters:
        inBackground - true if we should be in background mode
      • setOffline

        void setOffline​(boolean offline)
        Tells the event processor whether we should be in background mode. This is only applicable in the client-side (Android) SDK; in the server-side Java SDK, offline mode does not change dynamically and so we don't even bother to create an event processor if we're offline. In offline mode, events are enqueued but never flushed, and diagnostic events are not sent.
        Parameters:
        offline - true if we should be in offline mode