org.springframework.integration.message
Interface BlockingTarget

All Superinterfaces:
Target
All Known Subinterfaces:
MessageChannel
All Known Implementing Classes:
AbstractMessageChannel, DefaultErrorChannel, DirectChannel, PriorityChannel, QueueChannel, RendezvousChannel, RequestReplyTemplate.ReplyHandlingChannelAdapter, ThreadLocalChannel

public interface BlockingTarget
extends Target

Extends Target and provides a timeout-aware send method.

Author:
Mark Fisher

Method Summary
 boolean send(Message<?> message)
          Send a message, blocking indefinitely if necessary.
 boolean send(Message<?> message, long timeout)
          Send a message, blocking until either the message is accepted or the specified timeout period elapses.
 

Method Detail

send

boolean send(Message<?> message)
Send a message, blocking indefinitely if necessary.

Specified by:
send in interface Target
Parameters:
message - the Message to send
Returns:
true if the message is sent successfully, false if interrupted

send

boolean send(Message<?> message,
             long timeout)
Send a message, blocking until either the message is accepted or the specified timeout period elapses.

Parameters:
message - the Message to send
timeout - the timeout in milliseconds
Returns:
true if the message is sent successfully, false if the specified timeout period elapses or the send is interrupted