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:
Mark Fisher
2008-08-15 14:23:09 +00:00
parent 32f4722ee4
commit 34710691aa
4 changed files with 5 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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);
}
/**

View File

@@ -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);