Introduced WSF_ROUTER_SESSION

This fixes CQS violation from WSF_ROUTER.dispatch_and_return_handler (...): ? WSF_HANDLER
and related code, and this is more compliant with concurrency.

In addition, the WSF_ROUTER_SESSION can be enhanced in the future to answer more advanced needs.
This commit is contained in:
Jocelyn Fiat
2013-03-21 15:41:46 +01:00
parent ade9a30c03
commit 7c7bf9a3f8
9 changed files with 118 additions and 54 deletions

View File

@@ -40,10 +40,12 @@ feature -- Execution
require
req_attached: req /= Void
res_attached: res /= Void
local
sess: WSF_ROUTER_SESSION
do
if attached router.dispatch_and_return_handler (req, res) as p then
-- executed
else
create sess
router.dispatch (req, res, sess)
if not sess.dispatched then
execute_default (req, res)
end
end