Removed TargetEndpoint.

This commit is contained in:
Mark Fisher
2008-08-12 23:31:48 +00:00
parent 744db9e5a1
commit f56334f06b
4 changed files with 23 additions and 69 deletions

View File

@@ -52,7 +52,6 @@ import org.springframework.integration.endpoint.EndpointRegistry;
import org.springframework.integration.endpoint.HandlerEndpoint;
import org.springframework.integration.endpoint.MessageEndpoint;
import org.springframework.integration.endpoint.MessagingGateway;
import org.springframework.integration.endpoint.TargetEndpoint;
import org.springframework.integration.handler.MessageHandler;
import org.springframework.integration.message.MessageSource;
import org.springframework.integration.message.MessageTarget;
@@ -266,13 +265,6 @@ public class DefaultMessageBus implements MessageBus, ApplicationContextAware, A
this.registerEndpoint(endpoint);
}
public void registerTarget(String name, MessageTarget target, Object input, Schedule schedule) {
Assert.notNull(target, "'target' must not be null");
TargetEndpoint endpoint = new TargetEndpoint(target);
this.configureEndpoint(endpoint, name, input, schedule);
this.registerEndpoint(endpoint);
}
private void configureEndpoint(AbstractEndpoint endpoint, String name, Object input, Schedule schedule) {
endpoint.setName(name);
if (input instanceof MessageChannel) {

View File

@@ -23,7 +23,6 @@ import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.factory.ChannelFactory;
import org.springframework.integration.endpoint.EndpointRegistry;
import org.springframework.integration.handler.MessageHandler;
import org.springframework.integration.message.MessageTarget;
import org.springframework.integration.scheduling.Schedule;
/**
@@ -39,6 +38,4 @@ public interface MessageBus extends ChannelRegistry, EndpointRegistry, Lifecycle
void registerHandler(String name, MessageHandler handler, Object input, Schedule schedule);
void registerTarget(String name, MessageTarget target, Object input, Schedule schedule);
}

View File

@@ -1,37 +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.endpoint;
import org.springframework.integration.message.MessageTarget;
import org.springframework.util.Assert;
/**
* Base class for {@link MessageEndpoint} implementations to which Messages may be sent.
*
* @author Mark Fisher
*/
public class TargetEndpoint extends AbstractEndpoint {
public TargetEndpoint() {
}
public TargetEndpoint(MessageTarget target) {
Assert.notNull(target, "target must not be null");
this.setTarget(target);
}
}