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

    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

    Modifier and Type
    Method
    Description
    org.apache.camel.Consumer
    createConsumer(org.apache.camel.Processor processor)
     
    org.apache.camel.Producer
     
    protected void
     
    org.springframework.batch.core.launch.JobLauncher
     
    Deprecated.
     
    org.springframework.batch.core.configuration.JobRegistry
     
    boolean
     
    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, 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, toString

    Methods 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, suspend

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.ComponentAware

    getComponent

    Methods inherited from interface org.apache.camel.Endpoint

    getEndpointBaseUri, isSingletonProducer

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods 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

      public org.apache.camel.Producer createProducer() throws Exception
      Throws:
      Exception
    • 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 class org.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.