INT-1094 removed getName() from MessageChannel interface

This commit is contained in:
Mark Fisher
2010-04-26 00:25:41 +00:00
parent 920e6d6c19
commit d592ceac7a
9 changed files with 63 additions and 77 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,11 +23,6 @@ package org.springframework.integration.core;
*/
public interface MessageChannel {
/**
* Return the name of this channel.
*/
String getName();
/**
* Send a {@link Message} to this channel. May throw a RuntimeException for
* non-recoverable errors. Otherwise, if the Message cannot be sent for a

View File

@@ -46,6 +46,8 @@ public abstract class AbstractMessagingGateway extends AbstractEndpoint implemen
private volatile MessageChannel replyChannel;
private volatile long replyTimeout = 1000;
private final MessageChannelTemplate channelTemplate = new MessageChannelTemplate();
private volatile boolean shouldThrowErrors = true;
@@ -93,6 +95,7 @@ public abstract class AbstractMessagingGateway extends AbstractEndpoint implemen
* @param replyTimeout the timeout value in milliseconds
*/
public void setReplyTimeout(long replyTimeout) {
this.replyTimeout = replyTimeout;
this.channelTemplate.setReceiveTimeout(replyTimeout);
}
@@ -198,6 +201,7 @@ public abstract class AbstractMessagingGateway extends AbstractEndpoint implemen
(PollableChannel) this.replyChannel, handler);
endpoint.setTrigger(new PeriodicTrigger(10));
endpoint.setBeanFactory(this.getBeanFactory());
endpoint.setReceiveTimeout(this.replyTimeout);
endpoint.afterPropertiesSet();
correlator = endpoint;
}