Simplifications and counting changes for DefaultMessageDispatcherTests.

This commit is contained in:
Mark Fisher
2008-01-17 17:49:51 +00:00
parent 1af6bd7fb7
commit a1614c4e3a
6 changed files with 34 additions and 114 deletions

View File

@@ -16,7 +16,6 @@
package org.springframework.integration.dispatcher;
import org.springframework.integration.endpoint.EndpointPolicy;
import org.springframework.util.Assert;
/**
@@ -24,7 +23,7 @@ import org.springframework.util.Assert;
*
* @author Mark Fisher
*/
public class DispatcherPolicy implements EndpointPolicy {
public class DispatcherPolicy {
public final static int DEFAULT_MAX_MESSAGES_PER_TASK = 1;

View File

@@ -1,30 +0,0 @@
/*
* Copyright 2002-2007 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.router;
import java.util.Collection;
/**
* Base interface for aggregators.
*
* @author Mark Fisher
*/
public interface Aggregator<T> {
T aggregate(Collection<T> t);
}

View File

@@ -1,31 +0,0 @@
/*
* Copyright 2002-2007 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.router;
import java.util.Collection;
import java.util.List;
/**
* Base interface for resequencers.
*
* @author Mark Fisher
*/
public interface Resequencer<T> {
List<T> resequence(Collection<T> t);
}

View File

@@ -1,30 +0,0 @@
/*
* Copyright 2002-2007 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.router;
/**
* Base strategy interface for barriers. Defines the common requirement of
* routing scenarios that involve waiting for a particular condition to be
* satisfied, such as an {@link Aggregator} or {@link Resequencer}.
*
* @author Mark Fisher
*/
public interface RoutingBarrier<T> {
boolean checkCondition(T t);
}

View File

@@ -35,7 +35,7 @@ public class MessageFilter implements MessageHandler {
this.selector = selector;
}
public Message handle(Message message) {
public Message<?> handle(Message<?> message) {
if (this.selector.accept(message)) {
return message;
}