Class DefaultFluxzero

java.lang.Object
io.fluxzero.sdk.configuration.DefaultFluxzero
All Implemented Interfaces:
Fluxzero, AutoCloseable

public class DefaultFluxzero extends Object implements Fluxzero
  • Constructor Details

    • DefaultFluxzero

      public DefaultFluxzero()
  • Method Details

    • builder

      public static DefaultFluxzero.Builder builder()
    • customGateway

      public GenericGateway customGateway(String topic)
      Description copied from interface: Fluxzero
      Returns the gateway for given custom message topic.
      Specified by:
      customGateway in interface Fluxzero
    • tracking

      public Tracking tracking(MessageType messageType)
      Description copied from interface: Fluxzero
      Returns a client to assist with the tracking of a given message type.
      Specified by:
      tracking in interface Fluxzero
    • withClock

      public void withClock(@NonNull @NonNull Clock clock)
      Description copied from interface: Fluxzero
      Have Fluxzero use the given Clock when generating timestamps, e.g. when creating a Message.
      Specified by:
      withClock in interface Fluxzero
    • clock

      public Clock clock()
      Description copied from interface: Fluxzero
      Returns the clock used by Fluxzero to generate timestamps.
      Specified by:
      clock in interface Fluxzero
    • beforeShutdown

      public Registration beforeShutdown(Runnable task)
      Description copied from interface: Fluxzero
      Register a task to run before this Fluxzero instance is closed.
      Specified by:
      beforeShutdown in interface Fluxzero
    • close

      public void close(boolean silently)
      Description copied from interface: Fluxzero
      Closes this Fluxzero instance gracefully. If silently is true, shutdown is done without logging.
      Specified by:
      close in interface Fluxzero