Moved all *_CONTEXT_* router related classes into wsf_router_context.ecf library

This makes wsf simpler to discover.
And advanced context enabled handler, mapping, ... are still available for now in wsf_router_context.ecf library
This commit is contained in:
Jocelyn Fiat
2013-03-19 11:54:01 +01:00
parent a4ea402fb5
commit 3faa2ab815
28 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
note
description: "Summary description for {WSF_URI_AGENT_CONTEXT_HANDLER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_URI_AGENT_CONTEXT_HANDLER [C -> WSF_HANDLER_CONTEXT create make end]
inherit
WSF_URI_CONTEXT_HANDLER [C]
WSF_AGENT_CONTEXT_HANDLER [C]
rename
set_action as make
end
create
make
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

View File

@@ -0,0 +1,47 @@
note
description: "Summary description for {WSF_URI_CONTEXT_ROUTED_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
WSF_URI_CONTEXT_ROUTED_SERVICE [C -> WSF_HANDLER_CONTEXT create make end]
inherit
WSF_ROUTED_SERVICE
feature -- Mapping helper: uri
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C])
do
map_uri_with_request_methods (a_uri, h, Void)
end
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
do
router.map_with_request_methods (create {WSF_URI_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
end
feature -- Mapping helper: uri agent
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]])
do
map_uri_agent_with_request_methods (a_uri, proc, Void)
end
map_uri_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
do
map_uri_with_request_methods (a_uri, create {WSF_URI_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
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

View File

@@ -0,0 +1,43 @@
note
description: "Summary description for {WSF_URI_ROUTING_CONTEXT_HANDLER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WSF_URI_ROUTING_CONTEXT_HANDLER [C -> WSF_HANDLER_CONTEXT create make end]
inherit
WSF_ROUTING_CONTEXT_HANDLER [C]
WSF_URI_CONTEXT_HANDLER [C]
rename
execute as uri_execute
select
uri_execute
end
create
make,
make_with_router
feature -- Execution
uri_execute (ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE)
-- <Precursor>
--| For such routing handler, the previous context is lost
do
execute_with_context (ctx, 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