Class FunctionRegistryImpl

  • All Implemented Interfaces:
    io.dialob.rule.parser.function.FunctionRegistry

    @Enclosing
    public class FunctionRegistryImpl
    extends Object
    implements io.dialob.rule.parser.function.FunctionRegistry
    • Constructor Detail

      • FunctionRegistryImpl

        public FunctionRegistryImpl()
    • Method Detail

      • returnTypeOf

        public io.dialob.rule.parser.api.ValueType returnTypeOf​(@Nonnull
                                                                String functionName,
                                                                io.dialob.rule.parser.api.ValueType... argTypes)
                                                         throws io.dialob.rule.parser.api.VariableNotDefinedException
        Specified by:
        returnTypeOf in interface io.dialob.rule.parser.function.FunctionRegistry
        Throws:
        io.dialob.rule.parser.api.VariableNotDefinedException
      • isAsyncFunction

        public boolean isAsyncFunction​(String functionName)
        Specified by:
        isAsyncFunction in interface io.dialob.rule.parser.function.FunctionRegistry
      • configureFunction

        public void configureFunction​(@Nonnull
                                      String functionName,
                                      @Nonnull
                                      Class<?> implementationClass,
                                      boolean async)
        Specified by:
        configureFunction in interface io.dialob.rule.parser.function.FunctionRegistry
      • configureFunction

        public void configureFunction​(@Nonnull
                                      String functionName,
                                      @Nonnull
                                      String implementationName,
                                      @Nonnull
                                      Class<?> implementationClass,
                                      boolean async)
        Specified by:
        configureFunction in interface io.dialob.rule.parser.function.FunctionRegistry
      • invokeFunction

        public void invokeFunction​(io.dialob.rule.parser.function.FunctionRegistry.FunctionCallback callback,
                                   @Nonnull
                                   String functionName,
                                   Object... args)
        Invoke function dynamically by name
        Specified by:
        invokeFunction in interface io.dialob.rule.parser.function.FunctionRegistry
        Parameters:
        callback - After function this result is delegated to this
        functionName - Name of function to call
        args - List of call arguments
      • findConfiguredFunction

        protected io.dialob.client.spi.function.ConfiguredFunction findConfiguredFunction​(String canonicalFunctionName,
                                                                                          Object... args)
      • invokeFunctionAsync

        public void invokeFunctionAsync​(io.dialob.rule.parser.function.FunctionRegistry.FunctionCallback callback,
                                        @Nonnull
                                        String functionName,
                                        Object... args)
        Execute dynamically invoked function asynchronously by name
        Specified by:
        invokeFunctionAsync in interface io.dialob.rule.parser.function.FunctionRegistry
        Parameters:
        callback - After function this result is delegated to this
        functionName - Canonical function name to call
        args - List of arguments