Class RouteEntry
java.lang.Object
com.pixelservices.flash.components.http.routing.models.RouteEntry
-
Constructor Summary
ConstructorsConstructorDescriptionRouteEntry
(HttpMethod method, String path, RequestHandler handler, HandlerType handlerType, HandlerPoolManager poolManager) Constructor for lambda-based handlers (using a special pool)RouteEntry
(HttpMethod method, String path, Class<? extends RequestHandler> handlerClass, HandlerType handlerType, HandlerPoolManager poolManager) Constructor for class-based handlers that will use pooling -
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends RequestHandler> HandlerPool
<? extends RequestHandler> For literal routes, the key is simply "METHOD:/literal/path".getPath()
String[]
Returns the path segments for Trie traversal as String array.boolean
boolean
Attempts to match the given requestPath.
-
Constructor Details
-
RouteEntry
public RouteEntry(HttpMethod method, String path, Class<? extends RequestHandler> handlerClass, HandlerType handlerType, HandlerPoolManager poolManager) Constructor for class-based handlers that will use pooling -
RouteEntry
public RouteEntry(HttpMethod method, String path, RequestHandler handler, HandlerType handlerType, HandlerPoolManager poolManager) Constructor for lambda-based handlers (using a special pool)
-
-
Method Details
-
getMethod
-
getPath
-
getHandlerPool
-
getHandlerType
-
getHandlerClass
-
isParameterized
public boolean isParameterized() -
isDynamic
public boolean isDynamic() -
getPathSegments
Returns the path segments for Trie traversal as String array. -
getLiteralKey
For literal routes, the key is simply "METHOD:/literal/path". -
match
Attempts to match the given requestPath. - For literal routes, only an exact match returns an empty map. - For parameterized or dynamic routes, the precompiled pattern is used. Returns an unmodifiable map of parameters if it matches, or null if it doesn't.
-