Interface BusBuilder

All Known Implementing Classes:
BusBuilderImpl

public interface BusBuilder
Class used to build event buses.
  • Method Details

    • builder

      static BusBuilder builder()
      Returns a new bus builder.
      Returns:
      a new bus builder
    • setExceptionHandler

      BusBuilder setExceptionHandler(IEventExceptionHandler handler)
      Override the default exception handler.
      Parameters:
      handler - the custom exception handler to use
      Returns:
      the builder instance
    • startShutdown

      BusBuilder startShutdown()
      Create the bus in a shut down state.

      This bus will not post events (and will instead silently ignore them) until it is started.

      Returns:
      the builder instance
    • checkTypesOnDispatch

      BusBuilder checkTypesOnDispatch()
      Make the bus check posted events using the class checker.
      Returns:
      the builder instance
    • markerType

      default BusBuilder markerType(Class<?> markerInterface)
      Helper for classChecker(IEventClassChecker) that will check if the event type is of the given markerInterface.
      Parameters:
      markerInterface - a base marker interface for all events that this bus should be able to handle
      Returns:
      the builder instance
    • classChecker

      BusBuilder classChecker(IEventClassChecker checker)
      Set a class checker that will allow validating the event types that the bus can handle.
      Parameters:
      checker - the custom checker
      Returns:
      the builder instance
    • allowPerPhasePost

      BusBuilder allowPerPhasePost()
    • build

      IEventBus build()
      Returns a built bus configured according to the configuration of this builder.
      Returns:
      a built bus configured according to the configuration of this builder