org.springframework.integration.jpa.outbound
Class JpaOutboundGateway
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
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:
- submit (insert, delete) data to a database using JPA
- retrieve (select) data from a database
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 classes/interfaces inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
org.springframework.integration.handler.AbstractReplyProducingMessageHandler.RequestHandler |
| Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport |
logger |
| Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| 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 |
JpaOutboundGateway
public JpaOutboundGateway(JpaExecutor jpaExecutor)
- Constructor taking an
JpaExecutor that wraps all JPA Operations.
- Parameters:
jpaExecutor - Must not be null
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'.