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.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,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",
remote=false,
producerOnly=true,
category=WORKFLOW)
public class SpringBatchEndpoint
extends org.apache.camel.support.DefaultEndpoint
Send messages to Spring Batch for further processing.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionSpringBatchEndpoint(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
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.Producerprotected voiddoInit()org.springframework.batch.core.launch.JobLauncherDeprecated.org.springframework.batch.core.configuration.JobRegistrybooleanvoidsetJobFromHeader(boolean jobFromHeader) Explicitly defines if the jobName should be taken from the headers instead of the URI.voidsetJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher) Explicitly specifies a JobLauncher to be used.voidsetJobLauncherRef(String jobLauncherRef) Deprecated.voidsetJobName(String jobName) The name of the Spring Batch job located in the registry.voidsetJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry) Explicitly specifies a JobRegistry to be used.Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
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 Details
-
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
doInit
- Overrides:
doInitin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
getJobName
-
setJobName
The name of the Spring Batch job located in the registry. -
getJobLauncherRef
Deprecated. -
setJobLauncherRef
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.
-