Class TaskLaunchRequest

java.lang.Object
org.springframework.cloud.task.launcher.TaskLaunchRequest
All Implemented Interfaces:
Serializable

public class TaskLaunchRequest extends Object implements Serializable
Request that contains the maven repository and property information required by the TaskLauncherSink to launch the task.
Author:
Glenn Renfro
See Also:
  • Constructor Details

    • TaskLaunchRequest

      public TaskLaunchRequest(String uri, List<String> commandlineArguments, Map<String,String> environmentProperties, Map<String,String> deploymentProperties, String applicationName)
      Constructor for the TaskLaunchRequest.
      Parameters:
      uri - the URI to the task artifact to be launched.
      commandlineArguments - list of commandlineArguments to be used by the task
      environmentProperties - are the environment variables for this task.
      deploymentProperties - are the variables used to setup task on the platform.
      applicationName - name to be applied to the launched task. If set to null then the launched task name will be "Task-`hash code of the TaskLaunchRequest`.
    • TaskLaunchRequest

      public TaskLaunchRequest()
      Constructor for the TaskLaunchRequest.
      Since:
      2.0.0
  • Method Details

    • getUri

      public String getUri()
      Returns:
      the current uri to the artifact for this launch request.
    • getCommandlineArguments

      public List<String> getCommandlineArguments()
      Returns:
      an unmodifiable list of arguments that will be used for the task execution
    • getEnvironmentProperties

      public Map<String,String> getEnvironmentProperties()
      Retrieves the environment variables for the task.
      Returns:
      map containing the environment variables for the task.
    • getDeploymentProperties

      public Map<String,String> getDeploymentProperties()
      Returns the properties used by a TaskLauncher.
      Returns:
      deployment properties
    • getApplicationName

      public String getApplicationName()
      Returns the name that will be associated with the launched task.
      Returns:
      string containing the application name.
    • setApplicationName

      public void setApplicationName(String applicationName)
      Sets the name to be applied to the launched task. If set to null then the launched task name will be "Task-`unique id`".
      Parameters:
      applicationName - the name to be
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object