|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.core.MessagingTemplate
public class MessagingTemplate
This is the central class for invoking message exchange operations across
MessageChannel
s. It supports one-way send and receive calls as well
as request/reply.
To enable transactions, configure the 'transactionManager' property with a
reference to an instance of Spring's PlatformTransactionManager
strategy and optionally provide the other transactional attributes
(e.g. 'propagationBehaviorName').
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
MessagingTemplate()
Create a MessagingTemplate with no default channel. |
|
MessagingTemplate(MessageChannel defaultChannel)
Create a MessagingTemplate with the given default channel. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Message<?> |
receive()
|
Message<?> |
receive(PollableChannel channel)
|
boolean |
send(Message<?> message)
|
boolean |
send(MessageChannel channel,
Message<?> message)
|
Message<?> |
sendAndReceive(Message<?> request)
|
Message<?> |
sendAndReceive(MessageChannel channel,
Message<?> request)
|
void |
setDefaultChannel(MessageChannel defaultChannel)
Specify the default MessageChannel to use when invoking the send and/or receive methods that do not expect a channel parameter. |
void |
setIsolationLevelName(String isolationLevelName)
|
void |
setPropagationBehaviorName(String propagationBehaviorName)
|
void |
setReceiveTimeout(long receiveTimeout)
Specify the timeout value to use for receive operations. |
void |
setSendTimeout(long sendTimeout)
Specify the timeout value to use for send operations. |
void |
setTransactionManager(PlatformTransactionManager transactionManager)
Specify a transaction manager to use for all exchange operations. |
void |
setTransactionReadOnly(boolean readOnly)
|
void |
setTransactionTimeout(int transactionTimeout)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
public MessagingTemplate()
setDefaultChannel(MessageChannel)
.
public MessagingTemplate(MessageChannel defaultChannel)
Method Detail |
---|
public void setDefaultChannel(MessageChannel defaultChannel)
public void setSendTimeout(long sendTimeout)
sendTimeout
- the send timeout in millisecondspublic void setReceiveTimeout(long receiveTimeout)
receiveTimeout
- the receive timeout in millisecondspublic void setTransactionManager(PlatformTransactionManager transactionManager)
public void setPropagationBehaviorName(String propagationBehaviorName)
public void setIsolationLevelName(String isolationLevelName)
public void setTransactionTimeout(int transactionTimeout)
public void setTransactionReadOnly(boolean readOnly)
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public boolean send(Message<?> message)
public boolean send(MessageChannel channel, Message<?> message)
public Message<?> receive()
public Message<?> receive(PollableChannel channel)
public Message<?> sendAndReceive(Message<?> request)
public Message<?> sendAndReceive(MessageChannel channel, Message<?> request)
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |