Package org.apache.camel.spi
Interface SimpleFunction
public interface SimpleFunction
A custom simple language function
This allows to plugin custom functions to the built-in simple language.
-
Method Summary
-
Method Details
-
getName
String getName()The name of the function. Notice the name must not clash with any of the built-in function names. -
apply
Applies the function to the given input- Parameters:
exchange- the current exchangeinput- the input object, can be null- Returns:
- the response
- Throws:
Exception- can be thrown if there was an error
-
allowNull
default boolean allowNull()Whether this custom function allows null as input value. This is default false to avoidNullPointerExceptionand how the built-in functions also behaves.
-