concept job launch request in category spring

appears as: job launch request
Spring Batch in Action

This is an excerpt from Manning's book Spring Batch in Action.

Because Spring Integration provides adapters for many message sources (HTTP, file system, JMS, and so on), you can launch jobs using various technologies. Let’s start by defining a job launch request with a Java class.

Listing 11.1. Java representation of a job launch request
package com.manning.sbia.ch11.integration; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class JobLaunchRequest { private String jobName; private Map<String,String> jobParameters; public JobLaunchRequest(String jobName) { this(jobName,Collections.EMPTY_MAP); } public JobLaunchRequest(String jobName, Map<String,String> jobParams) { super(); this.jobName = jobName; this.jobParameters = jobParams; } public String getJobName() { return jobName; } public Map<String,String> getJobParameters() { return jobParameters == null ? Collections.EMPTY_MAP : Collections.unmodifiableMap(jobParameters); } }