|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.channel.MessageChannelTemplate
public class MessageChannelTemplate
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 | |
---|---|
MessageChannelTemplate()
Create a MessageChannelTemplate with no default channel. |
|
MessageChannelTemplate(MessageChannel defaultChannel)
Create a MessageChannelTemplate with the given default channel. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Message<?> |
receive()
|
Message<?> |
receive(PollableChannel channel)
|
boolean |
send(Message<?> message)
|
boolean |
send(Message<?> message,
MessageChannel channel)
|
Message<?> |
sendAndReceive(Message<?> request)
|
Message<?> |
sendAndReceive(Message<?> request,
MessageChannel channel)
|
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(java.lang.String isolationLevelName)
|
void |
setPropagationBehaviorName(java.lang.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(org.springframework.transaction.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 MessageChannelTemplate()
setDefaultChannel(MessageChannel)
.
public MessageChannelTemplate(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(org.springframework.transaction.PlatformTransactionManager transactionManager)
public void setPropagationBehaviorName(java.lang.String propagationBehaviorName)
public void setIsolationLevelName(java.lang.String isolationLevelName)
public void setTransactionTimeout(int transactionTimeout)
public void setTransactionReadOnly(boolean readOnly)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public boolean send(Message<?> message)
public boolean send(Message<?> message, MessageChannel channel)
public Message<?> receive()
public Message<?> receive(PollableChannel channel)
public Message<?> sendAndReceive(Message<?> request)
public Message<?> sendAndReceive(Message<?> request, MessageChannel channel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |