Package com.robothy.netty.router
Class SpringWebRouter
java.lang.Object
com.robothy.netty.router.AbstractRouter
com.robothy.netty.router.SpringWebRouter
- All Implemented Interfaces:
Router
-
Field Summary
Fields inherited from interface com.robothy.netty.router.Router
DEFAULT_NOT_FOUND_HANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmatch(HttpRequest request) Find a handler for the given request according to registered routes.Register a handler for the request that matched rule.Methods inherited from class com.robothy.netty.router.AbstractRouter
exceptionHandler, findExceptionHandler, notFound, notFoundHandler, staticResource, staticResourceMatcher
-
Constructor Details
-
SpringWebRouter
public SpringWebRouter()
-
-
Method Details
-
route
Description copied from interface:RouterRegister a handler for the request that matched rule.- Parameters:
rule- match conditions- Returns:
- this
-
match
Description copied from interface:RouterFind a handler for the given request according to registered routes. And set the extracted path parameters to HttpRequest.parameters(String).- Parameters:
request- HTTP request.- Returns:
- a matched handler; or
nullif no matched handlers.
-