Example usage for org.springframework.batch.core.configuration JobFactory getJobName

List of usage examples for org.springframework.batch.core.configuration JobFactory getJobName

Introduction

In this page you can find the example usage for org.springframework.batch.core.configuration JobFactory getJobName.

Prototype

String getJobName();

Source Link

Usage

From source file:org.springframework.batch.core.configuration.support.JobFactoryRegistrationListener.java

/**
 * Take the {@link JobFactory} provided and register it with the
 * {@link JobRegistry}./*from   w w  w  . j ava 2 s  .co  m*/
 * @param jobFactory a {@link JobFactory}
 * @param params not needed by this listener.
 * @throws Exception if there is a problem
 */
public void bind(JobFactory jobFactory, Map<String, ?> params) throws Exception {
    logger.info("Binding JobFactory: " + jobFactory.getJobName());
    jobRegistry.register(jobFactory);
}

From source file:org.springframework.batch.core.configuration.support.JobFactoryRegistrationListener.java

/**
 * Take the {@link JobFactory} provided and unregister it with the
 * {@link JobRegistry}.//from w  ww.j ava2s  .co  m
 * @param jobFactory a {@link JobFactory}
 * @param params not needed by this listener.
 * @throws Exception if there is a problem
 */
public void unbind(JobFactory jobFactory, Map<String, ?> params) throws Exception {
    logger.info("Unbinding JobFactory: " + jobFactory.getJobName());
    jobRegistry.unregister(jobFactory.getJobName());
}