diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePoller.java b/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePoller.java index a0510db77f..23ee867ea1 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePoller.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePoller.java @@ -17,7 +17,6 @@ package org.springframework.integration.endpoint; import org.springframework.integration.channel.MessageChannel; -import org.springframework.integration.message.BlockingSource; import org.springframework.integration.message.Message; import org.springframework.integration.message.MessageDeliveryAware; import org.springframework.integration.message.MessageDeliveryException; @@ -35,8 +34,6 @@ public class SourcePoller extends AbstractPoller { private final MessageChannel channel; - private volatile long receiveTimeout = 1000; - public SourcePoller(MessageSource> source, MessageChannel channel, Trigger trigger) { super(trigger); @@ -47,22 +44,9 @@ public class SourcePoller extends AbstractPoller { } - /** - * Specify the timeout to use when receiving from the source (in milliseconds). - * This value will only apply if the source is a {@link BlockingSource}. - *
- * A negative value indicates that receive calls should block indefinitely.
- * The default value is 1000 (1 second).
- */
- public void setReceiveTimeout(long receiveTimeout) {
- this.receiveTimeout = receiveTimeout;
- }
-
@Override
protected boolean doPoll() {
- Message> message = (this.receiveTimeout >= 0 && this.source instanceof BlockingSource)
- ? ((BlockingSource>) this.source).receive(this.receiveTimeout)
- : this.source.receive();
+ Message> message = this.source.receive();
if (message == null) {
return false;
}
diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/message/BlockingSource.java b/org.springframework.integration/src/main/java/org/springframework/integration/message/BlockingSource.java
deleted file mode 100644
index c0b0484092..0000000000
--- a/org.springframework.integration/src/main/java/org/springframework/integration/message/BlockingSource.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2002-2008 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.message;
-
-/**
- * Extends {@link PollableSource} and provides a timeout-aware receive method.
- *
- * @author Mark Fisher
- */
-public interface BlockingSourcenull if
- * interrupted
- */
- Messagenull if the
- * specified timeout period elapses or the message reception is interrupted
- */
- Message