Updated MessageTarget JavaDoc (INT-331).

This commit is contained in:
Mark Fisher
2008-08-19 16:07:36 +00:00
parent 44e0c1c0c0
commit 3f79525907

View File

@@ -23,6 +23,21 @@ package org.springframework.integration.message;
*/
public interface MessageTarget {
boolean send(Message<?> message);
/**
* Send a {@link Message} to this target. May throw a RuntimeException for non-recoverable
* errors. Otherwise, if the Message cannot be sent for a non-fatal reason such as timeout,
* then this method will return 'false', and if the Message is sent successfully, it will
* return 'true'.
*
* @param message the Message to send
*
* @return whether the Message has been sent successfully
*
* @throws MessageRejectedException if this particular Message is not accepted by the target
* (e.g. after consulting a {@link org.springframework.integration.message.selector.MessageSelector})
* @throws MessageDeliveryException if this target is unable to send the Message due
* to a transport error
*/
boolean send(Message<?> message) throws MessageRejectedException, MessageDeliveryException;
}