Interface UseCaseMethodInvoker
-
- All Known Implementing Classes:
SerializingMethodInvoker
public interface UseCaseMethodInvokerInvokes a specific method on the use case.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectinvoke(Object useCase, Object event, Deserializer requestDeserializer, Serializer responseSerializer, ParameterInjector parameterInjector)Takes the use case instance and the current event to invoke the method on the use case instance.
-
-
-
Method Detail
-
invoke
Object invoke(Object useCase, Object event, Deserializer requestDeserializer, Serializer responseSerializer, ParameterInjector parameterInjector) throws Exception
Takes the use case instance and the current event to invoke the method on the use case instance. TheDeserializeris used to deserialize the event into the parameters of the method. The method's return value is deserialized with theSerializer.- Parameters:
useCase- the use case instanceevent- the request messagerequestDeserializer- theDeserializerfor the parametersresponseSerializer- theSerializerfor the return valueparameterInjector- the configuredParameterInjectorwith all injections- Returns:
- the serialized return value as
Map - Throws:
MethodInvocationException- when the method cannot be invokedClassCastException- when the event is not a validMapof type<String, Object>Exception- all exceptions declared by the use case method are rethrown
-
-