Reduced visibility of new classes(for now)
minor polishing
This commit is contained in:
@@ -28,13 +28,13 @@ import org.springframework.http.HttpHeaders;
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class SimpleRequestBuilder implements RequestBuilder {
|
||||
class SimpleRequestBuilder implements RequestBuilder {
|
||||
|
||||
private String baseUrl = "http://${destination}";
|
||||
private Map<String, String> headers = new LinkedHashMap<>();
|
||||
private Environment environment;
|
||||
|
||||
public SimpleRequestBuilder(Environment environment) {
|
||||
SimpleRequestBuilder(Environment environment) {
|
||||
this.environment = environment;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,9 @@ import org.springframework.web.reactive.function.client.WebClient;
|
||||
@Conditional(SourceActiveCondition.class)
|
||||
@EnableConfigurationProperties(SupplierProperties.class)
|
||||
@ConditionalOnProperty(prefix = "spring.cloud.function.web.supplier", name = "enabled", matchIfMissing = true)
|
||||
public class SupplierAutoConfiguration {
|
||||
class SupplierAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SupplierExporter sourceForwarder(RequestBuilder requestBuilder,
|
||||
DestinationResolver destinationResolver, FunctionCatalog catalog,
|
||||
WebClient.Builder builder, SupplierProperties props) {
|
||||
@@ -51,7 +50,6 @@ public class SupplierAutoConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public RequestBuilder simpleRequestBuilder(SupplierProperties props,
|
||||
Environment environment) {
|
||||
SimpleRequestBuilder builder = new SimpleRequestBuilder(environment);
|
||||
|
||||
@@ -36,23 +36,31 @@ import reactor.core.scheduler.Schedulers;
|
||||
/**
|
||||
* Forwards items obtained from a {@link Supplier} or set of suppliers to an external HTTP
|
||||
* endpoint.
|
||||
*
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class SupplierExporter implements SmartLifecycle {
|
||||
class SupplierExporter implements SmartLifecycle {
|
||||
|
||||
private final FunctionCatalog catalog;
|
||||
|
||||
private final WebClient client;
|
||||
|
||||
private final DestinationResolver destinationResolver;
|
||||
|
||||
private final RequestBuilder requestBuilder;
|
||||
|
||||
private final String supplier;
|
||||
|
||||
private FunctionCatalog catalog;
|
||||
private WebClient client;
|
||||
private volatile boolean running;
|
||||
private volatile boolean ok = true;
|
||||
private boolean autoStartup = true;
|
||||
private boolean debug = true;
|
||||
private String supplier;
|
||||
private volatile Disposable subscription;
|
||||
|
||||
private DestinationResolver destinationResolver;
|
||||
private RequestBuilder requestBuilder;
|
||||
private volatile boolean ok = true;
|
||||
|
||||
private boolean autoStartup = true;
|
||||
|
||||
private boolean debug = true;
|
||||
|
||||
private volatile Disposable subscription;
|
||||
|
||||
public SupplierExporter(RequestBuilder requestBuilder,
|
||||
DestinationResolver destinationResolver, FunctionCatalog catalog,
|
||||
@@ -68,7 +76,6 @@ public class SupplierExporter implements SmartLifecycle {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
|
||||
if (this.running) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user