Removed MessageHandlerRejectedExecutionException as it is no longer used, and moved MessageListMethodAdapter to the 'aggregator' package since that is the only place it is used (and it may be refactored away).
This commit is contained in:
@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.integration.ConfigurationException;
|
||||
import org.springframework.integration.handler.MessageListMethodAdapter;
|
||||
import org.springframework.integration.message.Message;
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.handler;
|
||||
package org.springframework.integration.aggregator;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.aggregator;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.integration.handler.MessageListMethodAdapter;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
@@ -1,39 +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.handler;
|
||||
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.MessageHandlingException;
|
||||
|
||||
/**
|
||||
* An exception indicating that a message was rejected by a handler; typically
|
||||
* this would be the result of a thread pool executor rejecting a handler task.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MessageHandlerRejectedExecutionException extends MessageHandlingException {
|
||||
|
||||
public MessageHandlerRejectedExecutionException(Message<?> message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public MessageHandlerRejectedExecutionException(Message<?> message, Throwable cause) {
|
||||
super(message, "handler rejected execution", cause);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,30 +51,6 @@ public abstract class TestHandlers {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a handler that throws a {@link MessageHandlerRejectedExecutionException}.
|
||||
*/
|
||||
public final static Object rejectingHandler() {
|
||||
return new Object() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
throw new MessageHandlerRejectedExecutionException(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a handler that counts down on the provided latch and
|
||||
* then throws a {@link MessageHandlerRejectedExecutionException}.
|
||||
*/
|
||||
public final static Object rejectingCountDownHandler(final CountDownLatch latch) {
|
||||
return new Object() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
latch.countDown();
|
||||
throw new MessageHandlerRejectedExecutionException(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a handler that increments the provided counter.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user