io.github.amayaframework.router.Router Maven / Gradle / Ivy
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