Class WorkflowMethodParameterResolverFactory
java.lang.Object
io.axoniq.framework.workflow.configuration.WorkflowMethodParameterResolverFactory
- All Implemented Interfaces:
ParameterResolverFactory
@Internal
public class WorkflowMethodParameterResolverFactory
extends Object
implements ParameterResolverFactory
Parameter resolver factory serving both
Workflow body methods and
WorkflowStatusChangedHandler lifecycle methods, resolving
WorkflowContext, WorkflowStatus, WorkflowState, and any type wrapping a
WorkflowContext.- Since:
- 5.4.0
- Author:
- Steven van Beelen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Context.ResourceKey<WorkflowContext> Resource key under which theWorkflowContextof the invocation in progress is stored.static final Context.ResourceKey<WorkflowStatus> Resource key under which theWorkflowStatusof the invocation in progress is stored. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) If available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.
-
Field Details
-
WORKFLOW_CONTEXT_RESOURCE_KEY
Resource key under which theWorkflowContextof the invocation in progress is stored. -
WORKFLOW_STATUS_RESOURCE_KEY
Resource key under which theWorkflowStatusof the invocation in progress is stored. Only populated for lifecycle-handler invocations.
-
-
Constructor Details
-
WorkflowMethodParameterResolverFactory
public WorkflowMethodParameterResolverFactory()
-
-
Method Details
-
createInstance
public @Nullable ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) Description copied from interface:ParameterResolverFactoryIf available, creates aParameterResolverinstance that can provide a parameter of typeparameterTypefor a given message.If the
ParameterResolverFactorycannot provide a suitableParameterResolver, returnsnull.- Specified by:
createInstancein interfaceParameterResolverFactory- Parameters:
executable- The executable (constructor or method) to inspect.parameters- The parameters on the executable to inspect.parameterIndex- The index of the parameter to return aParameterResolverfor.- Returns:
- A suitable
ParameterResolver, ornullif none is found.
-