Class TaskLaunchRequestFunctionConfiguration
java.lang.Object
org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestFunctionConfiguration
@AutoConfiguration
@EnableConfigurationProperties(TaskLaunchRequestFunctionProperties.class)
public class TaskLaunchRequestFunctionConfiguration
extends Object
Configuration for a
TaskLaunchRequestFunction
, provided as a common function that can be composed with other Suppliers or
Functions to transform any Message
to a TaskLaunchRequest
which may be used as input to the TaskLauncherFunction
to launch a task.
Command line arguments used by the task, as well as the task name itself may be statically configured or extracted from
the message contents, using SpEL. See TaskLaunchRequestFunctionProperties
for details.
It is also possible to provide your own implementations of CommandLineArgumentsMessageMapper
and TaskNameMessageMapper
.- Author:
- David Turanski
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevaluationContext
(BeanFactory beanFactory) taskLaunchRequest
(org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestMessageProcessor taskLaunchRequestMessageProcessor) org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestSupplier
taskLaunchRequestInitializer
(TaskLaunchRequestFunctionProperties taskLaunchRequestProperties) org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestMessageProcessor
taskLaunchRequestMessageProcessor
(org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestSupplier taskLaunchRequestInitializer, TaskLaunchRequestFunctionProperties properties, EvaluationContext evaluationContext, TaskNameMessageMapper taskNameMessageMapper, CommandLineArgumentsMessageMapper commandLineArgumentsMessageMapper)
-
Field Details
-
TASK_LAUNCH_REQUEST_FUNCTION_NAME
The function name.- See Also:
-
-
Constructor Details
-
TaskLaunchRequestFunctionConfiguration
public TaskLaunchRequestFunctionConfiguration()
-
-
Method Details
-
taskLaunchRequest
@Bean(name="taskLaunchRequestFunction") public TaskLaunchRequestFunction taskLaunchRequest(org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestMessageProcessor taskLaunchRequestMessageProcessor) - Parameters:
taskLaunchRequestMessageProcessor
- aTaskLaunchRequestMessageProcessor
.- Returns:
- a
TaskLaunchRequest
Message.
-
taskLaunchRequestInitializer
@Bean public org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestSupplier taskLaunchRequestInitializer(TaskLaunchRequestFunctionProperties taskLaunchRequestProperties) -
taskLaunchRequestMessageProcessor
@Bean public org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestMessageProcessor taskLaunchRequestMessageProcessor(org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestSupplier taskLaunchRequestInitializer, TaskLaunchRequestFunctionProperties properties, EvaluationContext evaluationContext, @Nullable TaskNameMessageMapper taskNameMessageMapper, @Nullable CommandLineArgumentsMessageMapper commandLineArgumentsMessageMapper) -
evaluationContext
-