Class JobLaunchingGateway

  • All Implemented Interfaces:
    org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.integration.context.ExpressionCapable, org.springframework.integration.context.Orderable, org.springframework.integration.core.MessageProducer, org.springframework.integration.handler.HeaderPropagationAware, org.springframework.integration.support.context.NamedComponent, org.springframework.integration.support.management.ConfigurableMetricsAware<org.springframework.integration.support.management.AbstractMessageHandlerMetrics>, org.springframework.integration.support.management.IntegrationManagement, org.springframework.integration.support.management.IntegrationStatsManagement, org.springframework.integration.support.management.MessageHandlerMetrics, org.springframework.integration.support.management.TrackableComponent, org.springframework.messaging.MessageHandler, reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>

    public class JobLaunchingGateway
    extends org.springframework.integration.handler.AbstractReplyProducingMessageHandler
    The JobLaunchingGateway is used to launch Batch Jobs. Internally it delegates to a JobLaunchingMessageHandler.
    Since:
    1.3
    Author:
    Gunnar Hillert
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler

        org.springframework.integration.handler.AbstractReplyProducingMessageHandler.RequestHandler
      • Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement

        org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides
    • Field Summary

      • Fields inherited from class org.springframework.integration.handler.AbstractMessageProducingHandler

        messagingTemplate
      • Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport

        EXPRESSION_PARSER, logger
      • Fields inherited from interface org.springframework.integration.support.management.IntegrationManagement

        METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      protected java.lang.ObjecthandleRequestMessage​(org.springframework.messaging.Message<?> requestMessage)
      Launches a Batch Job using the provided request Message.
      • Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler

        doInit, doInvokeAdvisedRequestHandler, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReply
      • Methods inherited from class org.springframework.integration.handler.AbstractMessageProducingHandler

        addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeaders
      • Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler

        configureMetrics, destroy, getActiveCount, getActiveCountLong, getComponentType, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMetricsCaptor, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, handleMessage, isCountsEnabled, isLoggingEnabled, isStatsEnabled, onComplete, onError, onNext, onSubscribe, registerMetricsCaptor, reset, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabled
      • Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport

        afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface reactor.core.CoreSubscriber

        currentContext
      • Methods inherited from interface org.springframework.integration.support.context.NamedComponent

        getBeanName, getComponentName
    • Constructor Detail

      • JobLaunchingGateway

        public JobLaunchingGateway​(JobLauncher jobLauncher)
        Constructor taking a JobLauncher as parameter.
        Parameters:
        jobLauncher - Must not be null.
    • Method Detail

      • handleRequestMessage

        protected java.lang.Object handleRequestMessage​(org.springframework.messaging.Message<?> requestMessage)
        Launches a Batch Job using the provided request Message. The payload of the Messagemust be an instance of JobLaunchRequest.
        Specified by:
        handleRequestMessage in class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
        Parameters:
        requestMessage - must not be null.
        Returns:
        Generally a JobExecution will always be returned. An exception (MessageHandlingException) will only be thrown if there is a failure to start the job. The cause of the exception will be a JobExecutionException.
        Throws:
        org.springframework.messaging.MessageHandlingException - when a job cannot be launched