Interface ResponseSerializationStep1Builder

    • Method Detail

      • serializingUseCaseResponseBackOntoTheBusOfType

        default <T> ResponseSerializationStep2Builder<T> serializingUseCaseResponseBackOntoTheBusOfType​(Class<T> type)
        Enters a fluent builder that configures a Mapifier that will be used to serialize a use case return value onto the MessageBus if the use case return value is of the specified type.
        Type Parameters:
        T - the type of the response
        Parameters:
        type - the class of use case response that will be serialized by the Mapifier
        Returns:
        the next step in the fluent builder
      • serializingResponseObjectsOfTypeVoid

        default <T> ResponseSerializationStep2Builder<T> serializingResponseObjectsOfTypeVoid()
        Enters a fluent builder that configures a Mapifier that will be used to serialize a use case return value of type null.
        Type Parameters:
        T - the type of the follow up builder
        Returns:
        the next step in the fluent builder
      • serializingUseCaseResponseBackOntoTheBusThat

        ResponseSerializationStep2Builder<Object> serializingUseCaseResponseBackOntoTheBusThat​(Predicate<Object> filter)
        Enters a fluent builder that configures a Mapifier that will be used to serialize a use case return value onto the MessageBus if the use case return value matches the provided filter.
        Parameters:
        filter - a Predicate that returns true if the Mapifier should be used on the respective use case response
        Returns:
        the next step in the fluent builder
      • throwingAnExceptionByDefaultIfNoResponseSerializationCanBeApplied

        default ExceptionSerializationStep1Builder throwingAnExceptionByDefaultIfNoResponseSerializationCanBeApplied()
        Configures to throw an exception if no Mapifier configured matches the use case return value.
        Returns:
        the next step in the fluent builder
      • serializingUseCaseResponseBackOntoTheBusByDefaultUsing

        ExceptionSerializationStep1Builder serializingUseCaseResponseBackOntoTheBusByDefaultUsing​(Mapifier<Object> mapper)
        Configures the default Mapifier that will be used to serialize a use case return value onto the MessageBus if no Mapifier configured matches the use case return value.
        Parameters:
        mapper - a Mapifier
        Returns:
        the next step in the fluent builder