Spring Integration

org.springframework.integration.jpa.outbound
Class JpaOutboundGateway

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.handler.AbstractMessageHandler
          extended by org.springframework.integration.handler.AbstractReplyProducingMessageHandler
              extended by org.springframework.integration.jpa.outbound.JpaOutboundGateway
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, NamedComponent, Orderable, MessageHandler, MessageProducer, TrackableComponent

public class JpaOutboundGateway
extends AbstractReplyProducingMessageHandler

The Jpa Outbound Gateway will allow you to make outbound operations to either:

Depending on the selected OutboundGatewayType, the outbound gateway will use either the JpaExecutor's poll method or its executeOutboundJpaOperation method. In order to initialize the adapter, you must provide a JpaExecutor as constructor.

Since:
2.2
Author:
Gunnar Hillert

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
AbstractReplyProducingMessageHandler.RequestHandler
 
Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
JpaOutboundGateway(JpaExecutor jpaExecutor)
          Constructor taking an JpaExecutor that wraps all JPA Operations.
 
Method Summary
protected  java.lang.Object handleRequestMessage(Message<?> requestMessage)
          Subclasses must implement this method to handle the request Message.
protected  void onInit()
          Subclasses may implement this for initialization logic.
 void setGatewayType(OutboundGatewayType gatewayType)
           
 void setProducesReply(boolean producesReply)
          If set to 'false', this component will act as an Outbound Channel Adapter.
 
Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
getMessagingTemplate, handleMessageInternal, setAdviceChain, setBeanClassLoader, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

JpaOutboundGateway

public JpaOutboundGateway(JpaExecutor jpaExecutor)
Constructor taking an JpaExecutor that wraps all JPA Operations.

Parameters:
jpaExecutor - Must not be null
Method Detail

onInit

protected void onInit()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class AbstractReplyProducingMessageHandler

handleRequestMessage

protected java.lang.Object handleRequestMessage(Message<?> requestMessage)
Description copied from class: AbstractReplyProducingMessageHandler
Subclasses must implement this method to handle the request Message. The return value may be a Message, a MessageBuilder, or any plain Object. The base class will handle the final creation of a reply Message from any of those starting points. If the return value is null, the Message flow will end here.

Specified by:
handleRequestMessage in class AbstractReplyProducingMessageHandler

setGatewayType

public void setGatewayType(OutboundGatewayType gatewayType)
Parameters:
gatewayType -

setProducesReply

public void setProducesReply(boolean producesReply)
If set to 'false', this component will act as an Outbound Channel Adapter. If not explicitly set this property will default to 'true'.

Parameters:
producesReply - Defaults to 'true'.

Spring Integration