Simplify FunctionInvocationHelper and its CE implementation

This commit is contained in:
Oleg Zhurakousky
2021-03-24 16:31:41 +01:00
parent d16d61b294
commit cbee6603d0
2 changed files with 9 additions and 11 deletions

View File

@@ -26,11 +26,15 @@ package org.springframework.cloud.function.core;
*/
public interface FunctionInvocationHelper<I> {
boolean isRetainOuputAsMessage(I input);
default boolean isRetainOuputAsMessage(I input) {
return true;
};
I preProcessInput(I input, Object inputConverter);
default I preProcessInput(I input, Object inputConverter) {
return input;
}
I postProcessResult(Object result, String hint);
I postProcessResult(Object result, I input);
default Object postProcessResult(Object result, I input) {
return result;
}
}