Renamed MessageDispatcher's 'setTimeout' to 'setSendTimeout'. The more specific name is much clearer when the dispatcher is also being used for receive operations (e.g. PollingDispatcher).
This commit is contained in:
@@ -43,8 +43,8 @@ public abstract class AbstractDispatcher implements MessageDispatcher {
|
||||
private final MessageExchangeTemplate messageExchangeTemplate = new MessageExchangeTemplate();
|
||||
|
||||
|
||||
public void setTimeout(long timeout) {
|
||||
this.messageExchangeTemplate.setSendTimeout(timeout);
|
||||
public void setSendTimeout(long sendTimeout) {
|
||||
this.messageExchangeTemplate.setSendTimeout(sendTimeout);
|
||||
}
|
||||
|
||||
public boolean subscribe(MessageTarget target) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface MessageDispatcher extends MessageTarget, SubscribableSource {
|
||||
* Specify the timeout for sending to a target (in milliseconds).
|
||||
* Note that this value will only be applicable for blocking targets.
|
||||
*/
|
||||
void setTimeout(long timeout);
|
||||
void setSendTimeout(long sendTimeout);
|
||||
|
||||
boolean subscribe(MessageTarget target);
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public class PollingDispatcher implements SchedulableTask, SubscribableSource {
|
||||
* of {@link BlockingTarget}.
|
||||
*/
|
||||
public void setSendTimeout(long sendTimeout) {
|
||||
this.dispatcher.setTimeout(sendTimeout);
|
||||
this.dispatcher.setSendTimeout(sendTimeout);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -219,7 +219,7 @@ public class BroadcastingDispatcherTests {
|
||||
dispatcher.subscribe(targetMock1);
|
||||
dispatcher.subscribe(targetMock2);
|
||||
dispatcher.subscribe(targetMock3);
|
||||
dispatcher.setTimeout(50);
|
||||
dispatcher.setSendTimeout(50);
|
||||
// three threads invoking targets
|
||||
final CountDownLatch latch = new CountDownLatch(3);
|
||||
threadedExecutorMock(3);
|
||||
|
||||
Reference in New Issue
Block a user