Files
EWF/library/server/wsf/doc/router.txt
Jocelyn Fiat da3594db50 Now the 'router' library is part of 'wsf'
Move hello_routed_world under tests/dev since it was not really an example, but more a dev workspace/test
2011-12-15 14:10:52 +01:00

15 lines
581 B
Plaintext

This library introduce the notion of router and handler in the folder "router"
The Router manages the association between URI,URI template and Handler
The Router is in charge to route/dispatch a request to one of the Handler according to the URI and how the Handler is mapped in the Router.
Common usage
router: REQUEST_ROUTER
hello_handler: REQUEST_HANDLER
create {REQUEST_URI_TEMPLATE_ROUTER} router.make
create {REQUEST_AGENT_HANDLER} hello_handler.make (agent handle_hello)
router.map ("/hello/{name}", hello_handler)
router.map_agent ("/hello/{name}", agent handle_hello)