public class DefaultTaskService extends Object implements TaskService
TaskService interface. Provide service methods
for Tasks.| Constructor and Description |
|---|
DefaultTaskService(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties,
TaskDefinitionRepository repository,
DeploymentIdRepository deploymentIdRepository,
org.springframework.cloud.deployer.resource.registry.UriRegistry registry,
ResourceLoader resourceLoader,
org.springframework.cloud.deployer.spi.task.TaskLauncher taskLauncher,
ApplicationConfigurationMetadataResolver metaDataResolver)
Initializes the
DefaultTaskService. |
| Modifier and Type | Method and Description |
|---|---|
void |
executeTask(String taskName,
Map<String,String> runtimeProperties,
List<String> runtimeParams)
Execute a task with the provided task name and optional runtime properties.
|
public DefaultTaskService(org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties,
TaskDefinitionRepository repository,
DeploymentIdRepository deploymentIdRepository,
org.springframework.cloud.deployer.resource.registry.UriRegistry registry,
ResourceLoader resourceLoader,
org.springframework.cloud.deployer.spi.task.TaskLauncher taskLauncher,
ApplicationConfigurationMetadataResolver metaDataResolver)
DefaultTaskService.dataSourceProperties - the data source properties.repository - the TaskDefinitionRepository this service will use for
task CRUD operations.deploymentIdRepository - the repository this service will use for deployment
IDs.registry - URI registry this service will use to look up app URIs.resourceLoader - the ResourceLoader that will resolve URIs to
Resources.taskLauncher - the launcher this service will use to launch task apps.public void executeTask(String taskName, Map<String,String> runtimeProperties, List<String> runtimeParams)
TaskServiceexecuteTask in interface TaskServicetaskName - Name of the task. Must not be null or empty.runtimeProperties - Optional runtime properties. Must not be null.runtimeParams - Optional runtime commandline argumentsCopyright © 2017 Pivotal Software, Inc.. All rights reserved.