Interface Caller<U>
-
- Type Parameters:
U- the type of the use case
- All Known Implementing Classes:
SinglePublicUseCaseMethodCaller
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Caller<U>
ACalleris responsible to invoke the correct method on the use case instance. TheDeserializeris used to deserialize the event into the parameters of the method. TheSerializeris used to serialized the use case's return value back into aMap.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectcall(U useCase, Object event, CallingContext callingContext)Invokes the use case with the data from the event.
-
-
-
Method Detail
-
call
Object call(U useCase, Object event, CallingContext callingContext) throws Exception
Invokes the use case with the data from the event.- Parameters:
useCase- the use case instanceevent- the data for the use casecallingContext- contains objects for serialization or parameter injection- Returns:
- the serialized return value
- Throws:
Exception- all exceptions declared by the use case method are rethrown
-
-