Interface ReturnResolver
- All Known Implementing Classes:
ResultReturnResolver
,VoidReturnResolver
public interface ReturnResolver
Describes how to resolve a certain return value on a given
EventContext
-
Method Summary
Modifier and TypeMethodDescriptionvoid
resolve
(Object returnValue, EventContext context) Resolves the return value against the givenEventContext
.void
verifyOrThrow
(HandlerDescriptor descriptor) Verifies the resolver, based on the finalHandlerDescriptor
.
-
Method Details
-
resolve
Resolves the return value against the givenEventContext
. The method should put the return value on theEventContext
under the expected key.- Parameters:
returnValue
- the return valuecontext
- the context, which is currently being processed
-
verifyOrThrow
Verifies the resolver, based on the finalHandlerDescriptor
.- Parameters:
descriptor
- theHandlerDescriptor
- Throws:
IllegalArgumentException
- if the verification failed
-