Add FunctionRegistry interface (writable FunctionCatalog)

This makes dynamic function registration (after context starts) much
easier. Also frees us from having to employ BeanFactoryPostProcessor
and other tricks to get the functions registered on startup.
This commit is contained in:
Dave Syer
2017-11-13 14:13:59 +00:00
parent 41d1dfa6bc
commit 219d056801
6 changed files with 240 additions and 130 deletions

View File

@@ -16,7 +16,6 @@
package org.springframework.cloud.function.core;
import java.util.Collections;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;
@@ -33,9 +32,9 @@ public interface FunctionCatalog {
<T> Consumer<T> lookupConsumer(String name);
default Set<String> getSupplierNames() { return Collections.emptySet(); }
Set<String> getSupplierNames();
default Set<String> getFunctionNames() { return Collections.emptySet(); }
Set<String> getFunctionNames();
default Set<String> getConsumerNames() { return Collections.emptySet(); }
Set<String> getConsumerNames();
}