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

io.github.amayaframework.router.Router Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package io.github.amayaframework.router;

import java.util.function.Supplier;

/**
 * An interface describing an abstract router.
 *
 * @param  the path context value type
 */
public interface Router {

    /**
     * Maps given path with stored contexts.
     *
     * @param path     the specified path to be mapped
     * @param supplier the specified path tokens supplier
     * @return the {@link PathContext} associated with path or null
     */
    PathContext process(String path, Supplier> supplier);

    /**
     * Maps given path with stored contexts.
     *
     * @param path the specified path to be mapped
     * @return the {@link PathContext} associated with path or null
     */
    PathContext process(String path);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy