@Test public void launch() { Assert.assertNull(jobExecutionsChannel.receive(1)); Timestamp currentDate = new Timestamp(System.currentTimeMillis()); jobRequestsChannel.send( MessageBuilder.withPayload( new JobLaunchRequest("simpleJob",Collections.singletonMap("date", currentDate.toString()))) .build() ); Assert.assertEquals(currentDate.toString(),tasklet.getParameters().get("date")); Assert.assertNotNull(jobExecutionsChannel.receive(1)); }
public JobExecution launch(JobLaunchRequest request) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException, NoSuchJobException { Job job = jobRegistry.getJob(request.getJobName()); JobParametersBuilder builder = new JobParametersBuilder(); for(Map.Entry<String,String> entry : request.getJobParameters().entrySet()) { builder.addString(entry.getKey(), entry.getValue()); } return jobLauncher.run(job, builder.toJobParameters()); }
JobLaunchingMessageHandler { public JobExecution launch(JobLaunchRequest request) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException, NoSuchJobException { Job job = jobRegistry.getJob(request.getJobName()); JobParametersBuilder builder = new JobParametersBuilder(); for(Map.Entry<String,String> entry : request.getJobParameters().entrySet()) { builder.addString(entry.getKey(), entry.getValue()); } return jobLauncher.run(job, builder.toJobParameters()); } }
JobLaunchingMessageHandler { public JobExecution launch(JobLaunchRequest request) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException, NoSuchJobException { Job job = jobRegistry.getJob(request.getJobName()); JobParametersBuilder builder = new JobParametersBuilder(); for(Map.Entry<String,String> entry : request.getJobParameters().entrySet()) { builder.addString(entry.getKey(), entry.getValue()); } return jobLauncher.run(job, builder.toJobParameters()); } JobLaunchingMessageHandler(JobRegistry jobLocator,
			JobLauncher jobLauncher); }
JobLaunchingMessageHandler { public JobExecution launch(JobLaunchRequest request) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException, NoSuchJobException { Job job = jobRegistry.getJob(request.getJobName()); JobParametersBuilder builder = new JobParametersBuilder(); for(Map.Entry<String,String> entry : request.getJobParameters().entrySet()) { builder.addString(entry.getKey(), entry.getValue()); } return jobLauncher.run(job, builder.toJobParameters()); } JobLaunchingMessageHandler(JobRegistry jobLocator,
			JobLauncher jobLauncher); JobExecution launch(JobLaunchRequest request); }
JobLaunchingMessageHandler { public JobExecution launch(JobLaunchRequest request) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException, NoSuchJobException { Job job = jobRegistry.getJob(request.getJobName()); JobParametersBuilder builder = new JobParametersBuilder(); for(Map.Entry<String,String> entry : request.getJobParameters().entrySet()) { builder.addString(entry.getKey(), entry.getValue()); } return jobLauncher.run(job, builder.toJobParameters()); } JobLaunchingMessageHandler(JobRegistry jobLocator,
			JobLauncher jobLauncher); JobExecution launch(JobLaunchRequest request);  }