public class SimpleCommandLineArgsProvider extends TaskExecutionListenerSupport implements CommandLineArgsProvider
TaskExecution
provided
appended with any additional arguments configured.Constructor and Description |
---|
SimpleCommandLineArgsProvider() |
SimpleCommandLineArgsProvider(TaskExecution taskExecution) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getCommandLineArgs(org.springframework.batch.item.ExecutionContext executionContext)
Returns a unique list of command line arguements to be passed to the partition's
worker for the specified
ExecutionContext . |
void |
onTaskStartup(TaskExecution taskExecution)
Invoked after the
TaskExecution has been stored in the
TaskRepository . |
void |
setAppendedArgs(List<String> appendedArgs)
Additional command line args to be appended.
|
onTaskEnd, onTaskFailed
public SimpleCommandLineArgsProvider()
public SimpleCommandLineArgsProvider(TaskExecution taskExecution)
taskExecution
- task executionpublic void onTaskStartup(TaskExecution taskExecution)
TaskExecutionListener
TaskExecution
has been stored in the
TaskRepository
.onTaskStartup
in interface TaskExecutionListener
onTaskStartup
in class TaskExecutionListenerSupport
taskExecution
- instance containing the information about the current task.public void setAppendedArgs(List<String> appendedArgs)
appendedArgs
- list of argumentspublic List<String> getCommandLineArgs(org.springframework.batch.item.ExecutionContext executionContext)
CommandLineArgsProvider
ExecutionContext
.
Note: This method is called once per partition.getCommandLineArgs
in interface CommandLineArgsProvider
executionContext
- the unique state for the step to be executed.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.