org.springframework.integration.message
Interface MessageTarget

All Known Subinterfaces:
BlockingTarget, MessageChannel, MessageDispatcher, MessageEndpoint, PollableChannel
All Known Implementing Classes:
AbstractDispatcher, AbstractEndpoint, AbstractMessageChannel, AbstractPollableChannel, AbstractRequestReplyEndpoint, ApplicationEventTarget, BroadcastingDispatcher, ByteStreamTarget, CharacterStreamTarget, DefaultEndpoint, DefaultErrorChannel, DirectChannel, FileTarget, FtpTarget, InboundChannelAdapter, JmsTarget, MailTarget, MessageExchangeTemplate.TemporaryReturnAddress, MessagingBridge, MethodInvokingTarget, NullChannel, OutboundChannelAdapter, PriorityChannel, PublishSubscribeChannel, QueueChannel, RendezvousChannel, SimpleDispatcher, ThreadLocalChannel

public interface MessageTarget

Interface for any target to which Messages can be sent.

Author:
Mark Fisher

Method Summary
 boolean send(Message<?> message)
          Send a Message to this target.
 

Method Detail

send

boolean send(Message<?> message)
             throws MessageRejectedException,
                    MessageDeliveryException
Send a 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'.

Parameters:
message - the Message to send
Returns:
whether the Message has been sent successfully
Throws:
MessageRejectedException - if this particular Message is not accepted by the target (e.g. after consulting a MessageSelector)
MessageDeliveryException - if this target is unable to send the Message due to a transport error