All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.hekonsek.vertx.pipes.SimpleFunctionRegistry Maven / Gradle / Ivy

There is a newer version: 0.4
Show newest version
package com.github.hekonsek.vertx.pipes;

import java.util.LinkedHashMap;
import java.util.Map;

public class SimpleFunctionRegistry implements FunctionRegistry {

    private final Map functions = new LinkedHashMap<>();

    public void registerFunction(String functionName, Function function) {
        if(function instanceof StartableFunction) {
            ((StartableFunction) function).start();
        }
        functions.put(functionName, function);
    }

    @Override public Function function(String functionName) {
        return functions.get(functionName);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy