A generic application router with specificity-based handler searching