Interface ExceptionSerializationStep1Builder
-
- All Known Implementing Classes:
UseCaseInvocationBuilder
public interface ExceptionSerializationStep1Builder
-
-
Method Summary
-
-
-
Method Detail
-
serializingExceptionsThat
ExceptionSerializationStep2Builder<Exception> serializingExceptionsThat(Predicate<Exception> filter)
-
serializingExceptionsOfType
default <T> ExceptionSerializationStep2Builder<T> serializingExceptionsOfType(Class<T> type)
Enters a fluent builder that configures aMapifierthat will be used to serialize an exception to aMapif the exception is of the specified type.- Type Parameters:
T- the type of exception- Parameters:
type- the class of exception that will be serialized by theMapifier- Returns:
- the next step in the fluent builder
-
respondingWithAWrappingMissingExceptionSerializationExceptionByDefault
default ResponseDeserializationStep1Builder respondingWithAWrappingMissingExceptionSerializationExceptionByDefault()
Configures to throw an exception if noMapifierconfigured underserializingExceptionsThat(Predicate),serializingExceptionsOfType(Class), etc. matches exception.- Returns:
- the next step in the fluent builder
-
puttingExceptionObjectNamedAsExceptionIntoResponseMapByDefault
default ResponseDeserializationStep1Builder puttingExceptionObjectNamedAsExceptionIntoResponseMapByDefault()
Configures the defaultMapifierto take all exceptions, that have not been matched by a previous rule and serialize them into aMapby taking theExceptionobject and storing it under "Exception" key.- Returns:
- the next step in the fluent builder interface
-
serializingExceptionsByDefaultUsing
ResponseDeserializationStep1Builder serializingExceptionsByDefaultUsing(Mapifier<Exception> mapper)
Configures the defaultMapifierthat will be used to serialize an exception to aMapif noMapifierconfigured underserializingExceptionsThat(Predicate),serializingExceptionsOfType(Class), etc. matches the exception.- Parameters:
mapper- aMapifier- Returns:
- the next step in the fluent builder
-
-