Interface CallingBuilder<U>
-
- Type Parameters:
U- the type of the currently configured use case
- All Known Subinterfaces:
Step3Builder<U>
public interface CallingBuilder<U>This interface defines how a use case should be invoked. All responses are send back on the sameSerializedMessageBuswith theUseCaseInvokingResponseEventType.USE_CASE_RESPONSE_EVENT_TYPE.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Step1Buildercalling(BiFunction<U,Object,Map<String,Object>> caller)The givenBiFunctiongets access to the current use case instance and the event.Step1BuildercallingBy(Caller<U> caller)With this method the use case is invoked as defined in the givenCaller.Step1BuildercallingTheSingleUseCaseMethod()This method invokes the only public method on the current use case instance.default Step1BuildercallingVoid(BiConsumer<U,Object> caller)This method allows for calling use cases without a return value.
-
-
-
Method Detail
-
calling
default Step1Builder calling(BiFunction<U,Object,Map<String,Object>> caller)
The givenBiFunctiongets access to the current use case instance and the event. It should invoke the use case and return the serialized return value.- Parameters:
caller- theBiFunctioninvoking the use case- Returns:
- the next step in the fluent builder interface
-
callingVoid
default Step1Builder callingVoid(BiConsumer<U,Object> caller)
This method allows for calling use cases without a return value. TheBiConsumergets access to the current use case instance and event.- Parameters:
caller- theBiConsumerinvoking the use case- Returns:
- the next step in the fluent builder interface
-
callingTheSingleUseCaseMethod
Step1Builder callingTheSingleUseCaseMethod()
This method invokes the only public method on the current use case instance. All parameters of the method are deserialized as defined by theUseCaseInvocationBuilderand the optional return value is serialized using the serializing definitions of theUseCaseInvocationBuilder.- Returns:
- the next step in the fluent builder interface
-
callingBy
Step1Builder callingBy(Caller<U> caller)
With this method the use case is invoked as defined in the givenCaller.- Parameters:
caller- the caller to use- Returns:
- the next step in the fluent builder interface
-
-