com.fnproject.springframework.function.functions.SpringCloudFunction Maven / Gradle / Ivy
package com.fnproject.springframework.function.functions;
import org.springframework.cloud.function.context.catalog.FunctionInspector;
import reactor.core.publisher.Flux;
import java.util.function.Function;
/**
* {@link SpringCloudMethod} representing a {@link Function}
*/
public class SpringCloudFunction extends SpringCloudMethod {
private Function, Flux>> function;
public SpringCloudFunction(Function, Flux>> function, FunctionInspector inspector) {
super(inspector);
this.function = function;
}
@Override
protected String getMethodName() {
return "apply";
}
@Override
protected Object getFunction() {
return function;
}
@Override
public Flux> invoke(Flux> arg) {
return function.apply(arg);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy