Class SpringBatchEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.spring.batch.SpringBatchEndpoint
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.10.0", scheme="spring-batch", title="Spring Batch", syntax="spring-batch:jobName", producerOnly=true, category={SPRING,BATCH,SCHEDULING}) public class SpringBatchEndpoint extends org.apache.camel.support.DefaultEndpoint
Send messages to Spring Batch for further processing.
-
-
Constructor Summary
Constructors Constructor Description SpringBatchEndpoint(String endpointUri, org.apache.camel.Component component, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.launch.JobLauncher defaultResolvedJobLauncher, Map<String,org.springframework.batch.core.launch.JobLauncher> allResolvedJobLaunchers, String jobName, org.springframework.batch.core.configuration.JobRegistry jobRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.camel.Consumer
createConsumer(org.apache.camel.Processor processor)
org.apache.camel.Producer
createProducer()
protected void
doInit()
org.springframework.batch.core.launch.JobLauncher
getJobLauncher()
String
getJobLauncherRef()
Deprecated.String
getJobName()
org.springframework.batch.core.configuration.JobRegistry
getJobRegistry()
boolean
isJobFromHeader()
void
setJobFromHeader(boolean jobFromHeader)
Explicitly defines if the jobName should be taken from the headers instead of the URI.void
setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
Explicitly specifies a JobLauncher to be used.void
setJobLauncherRef(String jobLauncherRef)
Deprecated.void
setJobName(String jobName)
The name of the Spring Batch job located in the registry.void
setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry)
Explicitly specifies a JobRegistry to be used.-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
SpringBatchEndpoint
public SpringBatchEndpoint(String endpointUri, org.apache.camel.Component component, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.launch.JobLauncher defaultResolvedJobLauncher, Map<String,org.springframework.batch.core.launch.JobLauncher> allResolvedJobLaunchers, String jobName, org.springframework.batch.core.configuration.JobRegistry jobRegistry)
-
-
Method Detail
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
- Throws:
Exception
-
doInit
protected void doInit() throws Exception
- Overrides:
doInit
in classorg.apache.camel.support.DefaultEndpoint
- Throws:
Exception
-
getJobName
public String getJobName()
-
setJobName
public void setJobName(String jobName)
The name of the Spring Batch job located in the registry.
-
getJobLauncherRef
@Deprecated public String getJobLauncherRef()
Deprecated.
-
setJobLauncherRef
@Deprecated public void setJobLauncherRef(String jobLauncherRef)
Deprecated.Explicitly specifies a JobLauncher to be used looked up from the registry.
-
getJobLauncher
public org.springframework.batch.core.launch.JobLauncher getJobLauncher()
-
setJobLauncher
public void setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
Explicitly specifies a JobLauncher to be used.
-
setJobFromHeader
public void setJobFromHeader(boolean jobFromHeader)
Explicitly defines if the jobName should be taken from the headers instead of the URI.
-
isJobFromHeader
public boolean isJobFromHeader()
-
getJobRegistry
public org.springframework.batch.core.configuration.JobRegistry getJobRegistry()
-
setJobRegistry
public void setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry)
Explicitly specifies a JobRegistry to be used.
-
-