@Configuration @EnableConfigurationProperties(value=TaskLaunchRequestFunctionProperties.class) public class TaskLaunchRequestFunctionConfiguration extends Object
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
.Modifier and Type | Field and Description |
---|---|
static String |
TASK_LAUNCH_REQUEST_FUNCTION_NAME
The function name.
|
Constructor and Description |
---|
TaskLaunchRequestFunctionConfiguration() |
Modifier and Type | Method and Description |
---|---|
org.springframework.expression.EvaluationContext |
evaluationContext(org.springframework.beans.factory.BeanFactory beanFactory) |
TaskLaunchRequestFunction |
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,
org.springframework.expression.EvaluationContext evaluationContext,
TaskNameMessageMapper taskNameMessageMapper,
CommandLineArgumentsMessageMapper commandLineArgumentsMessageMapper) |
public static final String TASK_LAUNCH_REQUEST_FUNCTION_NAME
public TaskLaunchRequestFunctionConfiguration()
@Bean(name="taskLaunchRequestFunction") public TaskLaunchRequestFunction taskLaunchRequest(org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestMessageProcessor taskLaunchRequestMessageProcessor)
taskLaunchRequestMessageProcessor
- a TaskLaunchRequestMessageProcessor
.TaskLaunchRequest
Message.@Bean public org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestSupplier taskLaunchRequestInitializer(TaskLaunchRequestFunctionProperties taskLaunchRequestProperties)
@Bean public org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestMessageProcessor taskLaunchRequestMessageProcessor(org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestSupplier taskLaunchRequestInitializer, TaskLaunchRequestFunctionProperties properties, org.springframework.expression.EvaluationContext evaluationContext, @Nullable TaskNameMessageMapper taskNameMessageMapper, @Nullable CommandLineArgumentsMessageMapper commandLineArgumentsMessageMapper)
@Bean public org.springframework.expression.EvaluationContext evaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
Copyright © 2022. All rights reserved.