Class DocumentBusBuilder


  • public final class DocumentBusBuilder
    extends Object
    Builder class to create a new DocumentBus.
    • Constructor Detail

      • DocumentBusBuilder

        public DocumentBusBuilder()
    • Method Detail

      • aDefaultDocumentBus

        public static DocumentBus aDefaultDocumentBus()
        Creates a new DocumentBus based on a synchronous MessageBus.
        Returns:
        a new DocumentBus
      • aDocumentBus

        public static DocumentBusBuilder aDocumentBus()
        Factory method to create a new DocumentBusBuilder.
        Returns:
        newly created DocumentBusBuilder
      • using

        public DocumentBusBuilder using​(QueryResolver queryResolver)
        Sets the QueryResolver to be used for the DocumentBus.
        Parameters:
        queryResolver - the QueryResolver to be used
        Returns:
        the same DocumentBusBuilder instance the method was called one
      • using

        public DocumentBusBuilder using​(ConstraintEnforcer constraintEnforcer)
        Sets the ConstraintEnforcer to be used for the DocumentBus.
        Parameters:
        constraintEnforcer - the ConstraintEnforcer to be used
        Returns:
        the same DocumentBusBuilder instance the method was called one
      • using

        public DocumentBusBuilder using​(EventBus eventBus)
        Sets the EventBus to be used for the DocumentBus.
        Parameters:
        eventBus - the EventBus to be used
        Returns:
        the same DocumentBusBuilder instance the method was called one
      • build

        public DocumentBusImpl build()
        Creates the configured DocumentBus.
        Returns:
        newly created DocumentBus