Disconnect FunctionInspector from AbstractComposableFunctionRegistry and SimpleFunctionRegistry
This commit is contained in:
committed by
Oleg Zhurakousky
parent
555526192f
commit
271bc22969
@@ -63,7 +63,7 @@ import org.springframework.util.StringUtils;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractComposableFunctionRegistry implements FunctionRegistry,
|
public abstract class AbstractComposableFunctionRegistry implements FunctionRegistry,
|
||||||
FunctionInspector, ApplicationEventPublisherAware, EnvironmentAware {
|
ApplicationEventPublisherAware, EnvironmentAware {
|
||||||
|
|
||||||
private final Map<String, Object> functions = new ConcurrentHashMap<>();
|
private final Map<String, Object> functions = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ public abstract class AbstractComposableFunctionRegistry implements FunctionRegi
|
|||||||
this.environment = environment;
|
this.environment = environment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public FunctionRegistration<?> getRegistration(Object function) {
|
public FunctionRegistration<?> getRegistration(Object function) {
|
||||||
String functionName = function == null ? null
|
String functionName = function == null ? null
|
||||||
: this.lookupFunctionName(function);
|
: this.lookupFunctionName(function);
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ import org.springframework.util.StringUtils;
|
|||||||
* @author Oleg Zhurakousky
|
* @author Oleg Zhurakousky
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspector {
|
public class SimpleFunctionRegistry implements FunctionRegistry {
|
||||||
protected Log logger = LogFactory.getLog(this.getClass());
|
protected Log logger = LogFactory.getLog(this.getClass());
|
||||||
/*
|
/*
|
||||||
* - do we care about FunctionRegistration after it's been registered? What additional value does it bring?
|
* - do we care about FunctionRegistration after it's been registered? What additional value does it bring?
|
||||||
@@ -133,13 +133,6 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
|
|||||||
return (T) function;
|
return (T) function;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public FunctionRegistration<?> getRegistration(Object function) {
|
|
||||||
throw new UnsupportedOperationException("FunctionInspector is deprecated. There is no need "
|
|
||||||
+ "to access FunctionRegistration directly since you can interogate the actual "
|
|
||||||
+ "looked-up function (see FunctionInvocationWrapper.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> void register(FunctionRegistration<T> registration) {
|
public <T> void register(FunctionRegistration<T> registration) {
|
||||||
Assert.notNull(registration, "'registration' must not be null");
|
Assert.notNull(registration, "'registration' must not be null");
|
||||||
|
|||||||
Reference in New Issue
Block a user