renamed Up/Downstream annotations to In/Output

This commit is contained in:
Mark Fisher
2015-06-11 08:40:18 -04:00
parent 444c3822e4
commit 71d38c46ec
4 changed files with 13 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2015 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.
@@ -36,6 +36,6 @@ import org.springframework.beans.factory.annotation.Qualifier;
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Upstream {
public @interface Input {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2015 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.
@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
import org.springframework.beans.factory.annotation.Qualifier;
/**
* Qualifier annotation for a bean relating input channels.
* Qualifier annotation for a bean relating output channels.
*
* @author Dave Syer
*/
@@ -36,6 +36,6 @@ import org.springframework.beans.factory.annotation.Qualifier;
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Downstream {
public @interface Output {
}

View File

@@ -21,9 +21,9 @@ import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.bus.runner.adapter.ChannelLocator;
import org.springframework.bus.runner.adapter.Downstream;
import org.springframework.bus.runner.adapter.Output;
import org.springframework.bus.runner.adapter.MessageBusAdapter;
import org.springframework.bus.runner.adapter.Upstream;
import org.springframework.bus.runner.adapter.Input;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.discovery.event.HeartbeatEvent;
import org.springframework.cloud.client.discovery.event.HeartbeatMonitor;
@@ -36,7 +36,6 @@ import org.springframework.context.event.EventListener;
* rebinds the external channels as needed.
*
* @author Dave Syer
*
*/
@Configuration
@ConditionalOnClass(DiscoveryClient.class)
@@ -48,11 +47,11 @@ public class DiscoveryClientAutoConfiguration {
private MessageBusAdapter adapter;
@Autowired(required = false)
@Upstream
@Input
private ChannelLocator inputChannelLocator;
@Autowired(required = false)
@Downstream
@Output
private ChannelLocator outputChannelLocator;
private boolean enabled = false;

View File

@@ -30,10 +30,10 @@ import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.bus.runner.adapter.ChannelLocator;
import org.springframework.bus.runner.adapter.Upstream;
import org.springframework.bus.runner.adapter.Input;
import org.springframework.bus.runner.adapter.InputChannelBinding;
import org.springframework.bus.runner.adapter.MessageBusAdapter;
import org.springframework.bus.runner.adapter.Downstream;
import org.springframework.bus.runner.adapter.Output;
import org.springframework.bus.runner.adapter.OutputChannelBinding;
import org.springframework.bus.runner.endpoint.ChannelsEndpoint;
import org.springframework.context.annotation.Bean;
@@ -60,11 +60,11 @@ public class MessageBusAdapterConfiguration {
private ListableBeanFactory beanFactory;
@Autowired(required=false)
@Upstream
@Input
private ChannelLocator inputChannelLocator;
@Autowired(required=false)
@Downstream
@Output
private ChannelLocator outputChannelLocator;
@Bean