class CompositeJobExecutionListener implements JobExecutionListener {

	private final OrderedComposite<JobExecutionListener> listeners = new OrderedComposite<>();

	/**
	 * Public setter for the listeners.
	 * @param listeners list of {@link JobExecutionListener}s to be called when job
	 * execution events occur.
	 */
	public void setListeners(List<? extends JobExecutionListener> listeners) {
		this.listeners.setItems(listeners);
	}

	/**
	 * Register additional listener.
	 * @param jobExecutionListener instance {@link JobExecutionListener} to be registered.
	 */
	public void register(JobExecutionListener jobExecutionListener) {
		listeners.add(jobExecutionListener);
	}

	/**
	 * Call the registered listeners in reverse order, respecting and prioritising those
	 * that implement {@link Ordered}.
	 * @see org.springframework.batch.core.JobExecutionListener#afterJob(org.springframework.batch.core.JobExecution)
	 */
	@Override
	public void afterJob(JobExecution jobExecution) {<FILL_FUNCTION_BODY>}

	/**
	 * Call the registered listeners in order, respecting and prioritising those that
	 * implement {@link Ordered}.
	 * @see org.springframework.batch.core.JobExecutionListener#beforeJob(org.springframework.batch.core.JobExecution)
	 */
	@Override
	public void beforeJob(JobExecution jobExecution) {
		for (Iterator<JobExecutionListener> iterator = listeners.iterator(); iterator.hasNext();) {
			JobExecutionListener listener = iterator.next();
			listener.beforeJob(jobExecution);
		}
	}

}

		for (Iterator<JobExecutionListener> iterator = listeners.reverse(); iterator.hasNext();) {
			JobExecutionListener listener = iterator.next();
			listener.afterJob(jobExecution);
		}
	
<no_super_class>