This commit is contained in:
Rossen Stoyanchev
2013-06-13 01:13:04 -04:00
parent c420f37137
commit a1cfa3832e
3 changed files with 35 additions and 21 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.messaging;
/**
* Base channel interface defining common behavior for sending messages.
*
@@ -39,4 +40,17 @@ public interface MessageChannel {
*/
boolean send(Message<?> message);
/**
* Send a message, blocking until either the message is accepted or the
* specified timeout period elapses.
*
* @param message the {@link Message} to send
* @param timeout the timeout in milliseconds
*
* @return <code>true</code> if the message is sent successfully,
* <code>false</code> if the specified timeout period elapses or
* the send is interrupted
*/
boolean send(Message<?> message, long timeout);
}