Added WSF_ROUTING_CONTEXT_HANDLER
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
note
|
||||||
|
description: "Routing handler with context support"
|
||||||
|
author: "$Author$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_ROUTING_CONTEXT_HANDLER [C -> WSF_HANDLER_CONTEXT create make end]
|
||||||
|
|
||||||
|
inherit
|
||||||
|
WSF_ROUTING_HANDLER
|
||||||
|
|
||||||
|
WSF_CONTEXT_HANDLER [C]
|
||||||
|
rename
|
||||||
|
execute as execute_with_context
|
||||||
|
end
|
||||||
|
|
||||||
|
create
|
||||||
|
make,
|
||||||
|
make_with_router
|
||||||
|
|
||||||
|
feature -- Execution
|
||||||
|
|
||||||
|
execute_with_context (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
|
do
|
||||||
|
execute (req, res)
|
||||||
|
end
|
||||||
|
|
||||||
|
note
|
||||||
|
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Eiffel Software and others"
|
||||||
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
|
source: "[
|
||||||
|
Eiffel Software
|
||||||
|
5949 Hollister Ave., Goleta, CA 93117 USA
|
||||||
|
Telephone 805-685-1006, Fax 805-685-6869
|
||||||
|
Website http://www.eiffel.com
|
||||||
|
Customer support http://support.eiffel.com
|
||||||
|
]"
|
||||||
|
end
|
||||||
@@ -8,11 +8,13 @@ class
|
|||||||
WSF_URI_TEMPLATE_ROUTING_CONTEXT_HANDLER [C -> WSF_HANDLER_CONTEXT create make end]
|
WSF_URI_TEMPLATE_ROUTING_CONTEXT_HANDLER [C -> WSF_HANDLER_CONTEXT create make end]
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_ROUTING_HANDLER
|
WSF_ROUTING_CONTEXT_HANDLER [C]
|
||||||
|
|
||||||
WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]
|
WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]
|
||||||
rename
|
rename
|
||||||
execute as uri_template_execute
|
execute as uri_template_execute
|
||||||
|
select
|
||||||
|
uri_template_execute
|
||||||
end
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
@@ -25,7 +27,7 @@ feature -- Execution
|
|||||||
-- <Precursor>
|
-- <Precursor>
|
||||||
--| For such routing handler, the previous context is lost
|
--| For such routing handler, the previous context is lost
|
||||||
do
|
do
|
||||||
execute (req, res)
|
execute_with_context (ctx, req, res)
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
|
|||||||
Reference in New Issue
Block a user