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, org.springframework.integration.context.NamedComponent, org.springframework.integration.context.Orderable, org.springframework.integration.core.MessageHandler, org.springframework.integration.core.MessageProducer, org.springframework.integration.history.TrackableComponent

public class JpaOutboundGateway
extends org.springframework.integration.handler.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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.handler.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(org.springframework.integration.Message<?> requestMessage)
           
protected  void onInit()
           
 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()
Overrides:
onInit in class org.springframework.integration.handler.AbstractReplyProducingMessageHandler

handleRequestMessage

protected java.lang.Object handleRequestMessage(org.springframework.integration.Message<?> requestMessage)
Specified by:
handleRequestMessage in class org.springframework.integration.handler.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'.