diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/router/RouterMessageHandler.java b/org.springframework.integration/src/main/java/org/springframework/integration/router/RouterMessageHandler.java deleted file mode 100644 index c4f3ef723e..0000000000 --- a/org.springframework.integration/src/main/java/org/springframework/integration/router/RouterMessageHandler.java +++ /dev/null @@ -1,56 +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.router; - -import java.lang.reflect.Method; - -import org.springframework.integration.channel.ChannelRegistry; -import org.springframework.integration.channel.ChannelRegistryAware; -import org.springframework.integration.handler.MessageHandler; -import org.springframework.integration.message.Message; - -/** - * MessageHandler adapter for methods annotated with {@link Router @Router}. - * - * @author Mark Fisher - */ -public class RouterMessageHandler implements MessageHandler, ChannelRegistryAware { - - private final Router router; - - - public RouterMessageHandler(Object object, Method method) { - this.router = new MethodInvokingRouter(object, method); - } - - public RouterMessageHandler(Object object, String methodName) { - this.router = new MethodInvokingRouter(object, methodName); - } - - - public Message handle(Message message) { - this.router.route(message); - return null; - } - - public void setChannelRegistry(ChannelRegistry channelRegistry) { - if (this.router instanceof ChannelRegistryAware) { - ((ChannelRegistryAware) this.router).setChannelRegistry(channelRegistry); - } - } - -} diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/router/RouterMessageHandlerCreator.java b/org.springframework.integration/src/main/java/org/springframework/integration/router/RouterMessageHandlerCreator.java deleted file mode 100644 index 86d0cf1e11..0000000000 --- a/org.springframework.integration/src/main/java/org/springframework/integration/router/RouterMessageHandlerCreator.java +++ /dev/null @@ -1,36 +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.router; - -import java.lang.reflect.Method; -import java.util.Map; - -import org.springframework.integration.handler.MessageHandler; -import org.springframework.integration.handler.config.AbstractMessageHandlerCreator; - -/** - * Creates a {@link MessageHandler} adapter for router methods. - * - * @author Mark Fisher - */ -public class RouterMessageHandlerCreator extends AbstractMessageHandlerCreator { - - public MessageHandler doCreateHandler(Object object, Method method, Map attributes) { - return new RouterMessageHandler(object, method); - } - -}