Class JmsOutboundChannelAdapterSpec<S extends JmsOutboundChannelAdapterSpec<S>>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,JmsSendingMessageHandler>
org.springframework.integration.jms.dsl.JmsOutboundChannelAdapterSpec<S>
- Type Parameters:
S- the targetJmsOutboundChannelAdapterSpecimplementation type.
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<JmsSendingMessageHandler>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
JmsOutboundChannelAdapterSpec.JmsOutboundChannelSpecTemplateAware
public class JmsOutboundChannelAdapterSpec<S extends JmsOutboundChannelAdapterSpec<S>> extends org.springframework.integration.dsl.MessageHandlerSpec<S,JmsSendingMessageHandler>
A
MessageHandlerSpec for a JmsSendingMessageHandler.- Since:
- 5.0
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJmsOutboundChannelAdapterSpec.JmsOutboundChannelSpecTemplateAwareAJmsTemplate-basedJmsOutboundChannelAdapterSpecextension. -
Field Summary
Fields Modifier and Type Field Description protected JmsTemplateSpecjmsTemplateSpec -
Constructor Summary
Constructors Modifier Constructor Description protectedJmsOutboundChannelAdapterSpec(org.springframework.jms.core.JmsTemplate jmsTemplate) -
Method Summary
Modifier and Type Method Description SdeliveryModeExpression(java.lang.String deliveryModeExpression)Specify a SpEL expression to evaluate adeliveryModefor JMS message to send.<P> SdeliveryModeFunction(java.util.function.Function<org.springframework.messaging.Message<P>,?> deliveryModeFunction)Specify aFunctionto resolve adeliveryModefor JMS message to send.Sdestination(java.lang.String destination)Configure the name of the destination to which this adapter will send messages.<P> Sdestination(java.util.function.Function<org.springframework.messaging.Message<P>,?> destinationFunction)Configure aFunctionthat will be invoked at run time to determine the destination to which a message will be sent.Sdestination(javax.jms.Destination destination)Configure the destination to which this adapter will send messages.SdestinationExpression(java.lang.String destination)Configure a SpEL expression that will evaluate, at run time, the destination to which a message will be sent.SextractPayload(boolean extractPayload)SheaderMapper(JmsHeaderMapper headerMapper)StimeToLiveExpression(java.lang.String timeToLiveExpression)Specify a SpEL expression to evaluate atimeToLivefor JMS message to send.<P> StimeToLiveFunction(java.util.function.Function<org.springframework.messaging.Message<P>,?> timeToLiveFunction)Specify aFunctionto resolve atimeToLivefor JMS message to send.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
-
Field Details
-
Constructor Details
-
JmsOutboundChannelAdapterSpec
protected JmsOutboundChannelAdapterSpec(org.springframework.jms.core.JmsTemplate jmsTemplate)
-
-
Method Details
-
extractPayload
- Parameters:
extractPayload- the extractPayload flag.- Returns:
- the current
JmsOutboundChannelAdapterSpec. - See Also:
JmsSendingMessageHandler.setExtractPayload(boolean)
-
headerMapper
- Parameters:
headerMapper- the headerMapper.- Returns:
- the current
JmsOutboundChannelAdapterSpec. - See Also:
JmsSendingMessageHandler.setHeaderMapper(JmsHeaderMapper)
-
destination
Configure the destination to which this adapter will send messages.- Parameters:
destination- the destination.- Returns:
- the current
JmsOutboundChannelAdapterSpec. - See Also:
JmsSendingMessageHandler.setDestination(Destination)
-
destination
Configure the name of the destination to which this adapter will send messages.- Parameters:
destination- the destination name.- Returns:
- the current
JmsOutboundChannelAdapterSpec. - See Also:
JmsSendingMessageHandler.setDestinationName(String)
-
destinationExpression
Configure a SpEL expression that will evaluate, at run time, the destination to which a message will be sent.- Parameters:
destination- the destination name.- Returns:
- the current
JmsOutboundChannelAdapterSpec. - See Also:
JmsSendingMessageHandler.setDestinationExpression(Expression)
-
destination
public <P> S destination(java.util.function.Function<org.springframework.messaging.Message<P>,?> destinationFunction)Configure aFunctionthat will be invoked at run time to determine the destination to which a message will be sent. Typically used with a Java 8 Lambda expression:.<Foo>destination(m -> m.getPayload().getState())- Type Parameters:
P- the expected payload type.- Parameters:
destinationFunction- the destination function.- Returns:
- the current
JmsOutboundChannelAdapterSpec. - See Also:
JmsSendingMessageHandler.setDestinationExpression(Expression),FunctionExpression
-
deliveryModeExpression
Specify a SpEL expression to evaluate adeliveryModefor JMS message to send.- Parameters:
deliveryModeExpression- to use- Returns:
- the spec
- Since:
- 5.1
-
deliveryModeFunction
public <P> S deliveryModeFunction(java.util.function.Function<org.springframework.messaging.Message<P>,?> deliveryModeFunction)Specify aFunctionto resolve adeliveryModefor JMS message to send.- Type Parameters:
P- the expected payload type.- Parameters:
deliveryModeFunction- to use- Returns:
- the spec
- Since:
- 5.1
- See Also:
FunctionExpression
-
timeToLiveExpression
Specify a SpEL expression to evaluate atimeToLivefor JMS message to send.- Parameters:
timeToLiveExpression- to use- Returns:
- the spec
- Since:
- 5.1
-
timeToLiveFunction
public <P> S timeToLiveFunction(java.util.function.Function<org.springframework.messaging.Message<P>,?> timeToLiveFunction)Specify aFunctionto resolve atimeToLivefor JMS message to send.- Type Parameters:
P- the expected payload type.- Parameters:
timeToLiveFunction- to use- Returns:
- the spec
- Since:
- 5.1
- See Also:
FunctionExpression
-