Marked most of the *_with_request_methods procedure obsolete by the same feature name without the "_with_request_methods".
Added argument passing request methods to feature without the _with_request_methods. Prefer "thread" concurrency for now in examples.
This commit is contained in:
@@ -38,14 +38,14 @@ feature -- Router and Filter
|
|||||||
|
|
||||||
-- NOTE: you could put all those files in a specific folder, and use WSF_FILE_SYSTEM_HANDLER with "/"
|
-- NOTE: you could put all those files in a specific folder, and use WSF_FILE_SYSTEM_HANDLER with "/"
|
||||||
-- this way, it handles the caching and so on
|
-- this way, it handles the caching and so on
|
||||||
router.handle_with_request_methods ("/assets", create {WSF_FILE_SYSTEM_HANDLER}.make_hidden ("assets"), router.methods_GET)
|
router.handle ("/assets", create {WSF_FILE_SYSTEM_HANDLER}.make_hidden ("assets"), router.methods_GET)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Helper: mapping
|
feature -- Helper: mapping
|
||||||
|
|
||||||
map_agent_uri (a_uri: READABLE_STRING_8; a_action: like {WSF_URI_AGENT_HANDLER}.action; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_agent_uri (a_uri: READABLE_STRING_8; a_action: like {WSF_URI_AGENT_HANDLER}.action; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
do
|
do
|
||||||
router.map_with_request_methods (create {WSF_URI_MAPPING}.make (a_uri, create {WSF_URI_AGENT_HANDLER}.make (a_action)), rqst_methods)
|
router.map (create {WSF_URI_MAPPING}.make (a_uri, create {WSF_URI_AGENT_HANDLER}.make (a_action)), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Execution
|
feature -- Execution
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</target>
|
</target>
|
||||||
<target name="debug_any" extends="common">
|
<target name="debug_any" extends="common">
|
||||||
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="cgi" location="..\..\library\server\wsf\connector\cgi-safe.ecf" readonly="false"/>
|
<library name="cgi" location="..\..\library\server\wsf\connector\cgi-safe.ecf" readonly="false"/>
|
||||||
<library name="libfcgi" location="..\..\library\server\wsf\connector\libfcgi-safe.ecf" readonly="false"/>
|
<library name="libfcgi" location="..\..\library\server\wsf\connector\libfcgi-safe.ecf" readonly="false"/>
|
||||||
<library name="nino" location="..\..\library\server\wsf\connector\nino-safe.ecf" readonly="false"/>
|
<library name="nino" location="..\..\library\server\wsf\connector\nino-safe.ecf" readonly="false"/>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
</target>
|
</target>
|
||||||
<target name="debug_standalone" extends="common">
|
<target name="debug_standalone" extends="common">
|
||||||
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
|
||||||
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
|
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
|
||||||
<cluster name="src" location=".\src\" recursive="true"/>
|
<cluster name="src" location=".\src\" recursive="true"/>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
|
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
|
||||||
<assertions precondition="true" postcondition="true" check="true"/>
|
<assertions precondition="true" postcondition="true" check="true"/>
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="ewsgi" location="..\..\library\server\ewsgi\ewsgi-safe.ecf"/>
|
<library name="ewsgi" location="..\..\library\server\ewsgi\ewsgi-safe.ecf"/>
|
||||||
<library name="thread" location="$ISE_LIBRARY\library\thread\thread-safe.ecf"/>
|
<library name="thread" location="$ISE_LIBRARY\library\thread\thread-safe.ecf"/>
|
||||||
|
|||||||
@@ -45,11 +45,11 @@ feature -- Execution
|
|||||||
req := request
|
req := request
|
||||||
|
|
||||||
create router.make (3)
|
create router.make (3)
|
||||||
router.handle ("/test/{var}", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent handle_test))
|
router.handle ("/test/{var}", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent handle_test), Void)
|
||||||
router.handle ("/env", create {WSF_URI_AGENT_HANDLER}.make (agent handle_env))
|
router.handle ("/env", create {WSF_URI_AGENT_HANDLER}.make (agent handle_env), Void)
|
||||||
router.handle ("/exit", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent handle_exit))
|
router.handle ("/exit", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent handle_exit), Void)
|
||||||
create fs.make_with_path ((create {EXECUTION_ENVIRONMENT}).current_working_path.extended ("files"))
|
create fs.make_with_path ((create {EXECUTION_ENVIRONMENT}).current_working_path.extended ("files"))
|
||||||
router.handle ("/files", fs)
|
router.handle ("/files", fs, Void)
|
||||||
create sess
|
create sess
|
||||||
router.dispatch (req, response, sess)
|
router.dispatch (req, response, sess)
|
||||||
if not sess.dispatched then
|
if not sess.dispatched then
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</target>
|
</target>
|
||||||
<target name="filter_standalone" extends="common">
|
<target name="filter_standalone" extends="common">
|
||||||
<root class="FILTER_SERVER" feature="make"/>
|
<root class="FILTER_SERVER" feature="make"/>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="true"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="true"/>
|
||||||
<cluster name="filter" location="src\" recursive="true"/>
|
<cluster name="filter" location="src\" recursive="true"/>
|
||||||
</target>
|
</target>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ feature {NONE} -- Initialization
|
|||||||
create l_methods
|
create l_methods
|
||||||
l_methods.enable_options
|
l_methods.enable_options
|
||||||
l_methods.enable_get
|
l_methods.enable_get
|
||||||
router.handle_with_request_methods ("/user/{userid}", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent l_options_filter.execute), l_methods)
|
router.handle ("/user/{userid}", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent l_options_filter.execute), l_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
initialize_json
|
initialize_json
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</file_rule>
|
</file_rule>
|
||||||
<option full_class_checking="false" void_safety="all">
|
<option full_class_checking="false" void_safety="all">
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false">
|
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false">
|
||||||
<option debug="true">
|
<option debug="true">
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ feature {NONE} -- Initialization
|
|||||||
doc: WSF_ROUTER_SELF_DOCUMENTATION_HANDLER
|
doc: WSF_ROUTER_SELF_DOCUMENTATION_HANDLER
|
||||||
do
|
do
|
||||||
create order_handler.make_with_router (router)
|
create order_handler.make_with_router (router)
|
||||||
router.handle_with_request_methods ("/order", order_handler, router.methods_POST)
|
router.handle ("/order", order_handler, router.methods_POST)
|
||||||
router.handle_with_request_methods ("/order/{orderid}", order_handler, router.methods_GET + router.methods_DELETE + router.methods_PUT)
|
router.handle ("/order/{orderid}", order_handler, router.methods_GET + router.methods_DELETE + router.methods_PUT)
|
||||||
create doc.make_hidden (router)
|
create doc.make_hidden (router)
|
||||||
router.handle_with_request_methods ("/api/doc", doc, router.methods_GET)
|
router.handle ("/api/doc", doc, router.methods_GET)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<option warning="true" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
|
<option warning="true" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
|
||||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf"/>
|
||||||
<cluster name="simple" location=".\" recursive="true"/>
|
<cluster name="simple" location=".\" recursive="true"/>
|
||||||
</target>
|
</target>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<option warning="true" full_class_checking="false" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
|
<option warning="true" full_class_checking="false" is_attached_by_default="true" void_safety="transitional" syntax="transitional">
|
||||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="thread"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf"/>
|
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf"/>
|
||||||
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf"/>
|
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf"/>
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ feature {NONE} -- Initialization
|
|||||||
local
|
local
|
||||||
www: WSF_FILE_SYSTEM_HANDLER
|
www: WSF_FILE_SYSTEM_HANDLER
|
||||||
do
|
do
|
||||||
map_uri_template_agent_with_request_methods ("/upload/{name}{?nb}", agent execute_upload_put, router.methods_put)
|
map_uri_template_agent ("/upload/{name}{?nb}", agent execute_upload_put, router.methods_put)
|
||||||
map_uri_template_agent ("/upload{?nb}", agent execute_upload, Void)
|
map_uri_template_agent ("/upload{?nb}", agent execute_upload, Void)
|
||||||
|
|
||||||
create www.make_with_path (document_root)
|
create www.make_with_path (document_root)
|
||||||
www.set_directory_index (<<"index.html">>)
|
www.set_directory_index (<<"index.html">>)
|
||||||
www.set_not_found_handler (agent execute_not_found)
|
www.set_not_found_handler (agent execute_not_found)
|
||||||
router.handle_with_request_methods ("", www, router.methods_GET)
|
router.handle ("", www, router.methods_GET)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Configuration
|
feature -- Configuration
|
||||||
|
|||||||
@@ -11,16 +11,18 @@ inherit
|
|||||||
|
|
||||||
feature -- Mapping helper: uri
|
feature -- Mapping helper: uri
|
||||||
|
|
||||||
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER)
|
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `h' as handler for `a_uri'
|
-- Map `h' as handler for `a_uri', according to `rqst_methods'.
|
||||||
do
|
do
|
||||||
map_uri_with_request_methods (a_uri, h, Void)
|
router.map (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `h' as handler for `a_uri' for request methods `rqst_methods'.
|
-- Map `h' as handler for `a_uri' for request methods `rqst_methods'.
|
||||||
|
obsolete
|
||||||
|
"Use directly `map_uri' [June/2015]"
|
||||||
do
|
do
|
||||||
router.map_with_request_methods (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
map_uri (a_uri, h, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_response (a_uri: READABLE_STRING_8; h: WSF_URI_RESPONSE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_response (a_uri: READABLE_STRING_8; h: WSF_URI_RESPONSE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
@@ -28,21 +30,23 @@ feature -- Mapping helper: uri
|
|||||||
require
|
require
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
router.map_with_request_methods (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
router.map (create {WSF_URI_MAPPING}.make (a_uri, h), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Mapping helper: uri agent
|
feature -- Mapping helper: uri agent
|
||||||
|
|
||||||
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]])
|
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `proc' as handler for `a_uri'
|
-- Map `proc' as handler for `a_uri', according to `rqst_methods'.
|
||||||
do
|
do
|
||||||
map_uri_agent_with_request_methods (a_uri, proc, Void)
|
map_uri (a_uri, create {WSF_URI_AGENT_HANDLER}.make (proc), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `proc' as handler for `a_uri' for request methods `rqst_methods'.
|
-- Map `proc' as handler for `a_uri' for request methods `rqst_methods'.
|
||||||
|
obsolete
|
||||||
|
"Use directly `map_uri_agent' [June/2015]"
|
||||||
do
|
do
|
||||||
map_uri_with_request_methods (a_uri, create {WSF_URI_AGENT_HANDLER}.make (proc), rqst_methods)
|
map_uri_agent (a_uri, proc, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_response_agent (a_uri: READABLE_STRING_8; a_action: like {WSF_URI_RESPONSE_AGENT_HANDLER}.action; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_response_agent (a_uri: READABLE_STRING_8; a_action: like {WSF_URI_RESPONSE_AGENT_HANDLER}.action; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ inherit
|
|||||||
feature -- Mapping helper: uri template
|
feature -- Mapping helper: uri template
|
||||||
|
|
||||||
map_uri_template (a_tpl: STRING; h: WSF_URI_TEMPLATE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_template (a_tpl: STRING; h: WSF_URI_TEMPLATE_HANDLER; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `h' as handler for `a_tpl'.
|
-- Map `h' as handler for `a_tpl', according to `rqst_methods'.
|
||||||
require
|
require
|
||||||
a_tpl_attached: a_tpl /= Void
|
a_tpl_attached: a_tpl /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
@@ -43,7 +43,7 @@ feature -- Mapping helper: uri template
|
|||||||
feature -- Mapping helper: uri template agent
|
feature -- Mapping helper: uri template agent
|
||||||
|
|
||||||
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `proc' as handler for `a_tpl'
|
-- Map `proc' as handler for `a_tpl', according to `rqst_methods'.
|
||||||
require
|
require
|
||||||
a_tpl_attached: a_tpl /= Void
|
a_tpl_attached: a_tpl /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
|
|||||||
@@ -65,11 +65,13 @@ feature {NONE} -- Initialization
|
|||||||
feature -- Mapping
|
feature -- Mapping
|
||||||
|
|
||||||
map (a_mapping: WSF_ROUTER_MAPPING; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map (a_mapping: WSF_ROUTER_MAPPING; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map `a_mapping'.
|
-- Map `a_mapping',
|
||||||
|
-- if `rqst_methods' is set, accept only request method in `rqst_methods'.
|
||||||
|
-- if `rqst_method' is Void, accept any request methods.
|
||||||
require
|
require
|
||||||
a_mapping_attached: a_mapping /= Void
|
a_mapping_attached: a_mapping /= Void
|
||||||
do
|
do
|
||||||
extend (create {WSF_ROUTER_ITEM}.make_with_request_methods (a_mapping, rqst_methods))
|
extend (create {WSF_ROUTER_ITEM}.make (a_mapping, rqst_methods))
|
||||||
end
|
end
|
||||||
|
|
||||||
map_with_request_methods (a_mapping: WSF_ROUTER_MAPPING; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_with_request_methods (a_mapping: WSF_ROUTER_MAPPING; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
@@ -120,6 +122,8 @@ feature -- Mapping handler
|
|||||||
|
|
||||||
handle (a_resource: READABLE_STRING_8; f: WSF_ROUTER_MAPPING_FACTORY; rqst_methods: detachable WSF_REQUEST_METHODS)
|
handle (a_resource: READABLE_STRING_8; f: WSF_ROUTER_MAPPING_FACTORY; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
-- Map the mapping created by factory `f' for resource `a_resource'.
|
-- Map the mapping created by factory `f' for resource `a_resource'.
|
||||||
|
-- if `rqst_methods' is set, accept only request method in `rqst_methods'.
|
||||||
|
-- if `rqst_method' is Void, accept any request methods.
|
||||||
require
|
require
|
||||||
a_resource_attached: a_resource /= Void
|
a_resource_attached: a_resource /= Void
|
||||||
f_attached: f /= Void
|
f_attached: f /= Void
|
||||||
|
|||||||
@@ -16,19 +16,13 @@ inherit
|
|||||||
DEBUG_OUTPUT
|
DEBUG_OUTPUT
|
||||||
|
|
||||||
create
|
create
|
||||||
make,
|
make
|
||||||
make_with_request_methods
|
|
||||||
|
|
||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
make (m: like mapping)
|
make (m: like mapping; r: like request_methods)
|
||||||
do
|
do
|
||||||
mapping := m
|
mapping := m
|
||||||
end
|
|
||||||
|
|
||||||
make_with_request_methods (m: like mapping; r: like request_methods)
|
|
||||||
do
|
|
||||||
make (m)
|
|
||||||
set_request_methods (r)
|
set_request_methods (r)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -71,7 +65,7 @@ invariant
|
|||||||
mapping_attached: mapping /= Void
|
mapping_attached: mapping /= Void
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -14,42 +14,46 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Mapping helper: starts_with
|
feature -- Mapping helper: starts_with
|
||||||
|
|
||||||
map_starts_with (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C])
|
map_starts_with (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
map_starts_with_request_methods (a_uri, h, Void)
|
router.map (create {WSF_STARTS_WITH_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_starts_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_starts_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_STARTS_WITH_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
|
obsolete
|
||||||
|
"Use directly `map_starts_with' [June-2015]"
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
router.map_with_request_methods (create {WSF_STARTS_WITH_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
map_starts_with (a_uri, h, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Mapping helper: starts_with agent
|
feature -- Mapping helper: starts_with agent
|
||||||
|
|
||||||
map_starts_with_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]])
|
map_starts_with_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
do
|
do
|
||||||
map_starts_with_agent_with_request_methods (a_uri, proc, Void)
|
map_starts_with (a_uri, create {WSF_STARTS_WITH_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_starts_with_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_starts_with_agent_with_request_methods (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [start_path: READABLE_STRING_8; ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
|
obsolete
|
||||||
|
"Use directly `map_starts_with_agent' [June-2015]"
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
do
|
do
|
||||||
map_starts_with_request_methods (a_uri, create {WSF_STARTS_WITH_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
map_starts_with_agent (a_uri, proc, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -14,42 +14,46 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Mapping helper: uri
|
feature -- Mapping helper: uri
|
||||||
|
|
||||||
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C])
|
map_uri (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
map_uri_with_request_methods (a_uri, h, Void)
|
router.map (create {WSF_URI_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_with_request_methods (a_uri: READABLE_STRING_8; h: WSF_URI_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
|
obsolete
|
||||||
|
"Use directly `map_uri' [June-2015]"
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
router.map_with_request_methods (create {WSF_URI_CONTEXT_MAPPING [C]}.make (a_uri, h), rqst_methods)
|
map_uri (a_uri, h, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Mapping helper: uri agent
|
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]])
|
map_uri_agent (a_uri: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
do
|
do
|
||||||
map_uri_agent_with_request_methods (a_uri, proc, Void)
|
map_uri (a_uri, create {WSF_URI_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||||
end
|
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)
|
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)
|
||||||
|
obsolete
|
||||||
|
"Use directly `map_uri_agent' [June-2015]"
|
||||||
require
|
require
|
||||||
a_uri_attached: a_uri /= Void
|
a_uri_attached: a_uri /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
do
|
do
|
||||||
map_uri_with_request_methods (a_uri, create {WSF_URI_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
map_uri_agent (a_uri, proc, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -14,42 +14,46 @@ feature -- Access
|
|||||||
|
|
||||||
feature -- Mapping helper: uri
|
feature -- Mapping helper: uri
|
||||||
|
|
||||||
map_uri_template (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C])
|
map_uri_template (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
require
|
require
|
||||||
a_tpl_attached: a_tpl /= Void
|
a_tpl_attached: a_tpl /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
map_uri_template_with_request_methods (a_tpl, h, Void)
|
router.map (create {WSF_URI_TEMPLATE_CONTEXT_MAPPING [C]}.make (a_tpl, h), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_template_with_request_methods (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_template_with_request_methods (a_tpl: READABLE_STRING_8; h: WSF_URI_TEMPLATE_CONTEXT_HANDLER [C]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
|
obsolete
|
||||||
|
"Use directly `make_uri_template' [June/2015]"
|
||||||
require
|
require
|
||||||
a_tpl_attached: a_tpl /= Void
|
a_tpl_attached: a_tpl /= Void
|
||||||
h_attached: h /= Void
|
h_attached: h /= Void
|
||||||
do
|
do
|
||||||
router.map_with_request_methods (create {WSF_URI_TEMPLATE_CONTEXT_MAPPING [C]}.make (a_tpl, h), rqst_methods)
|
map_uri_template (a_tpl, h, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature -- Mapping helper: uri agent
|
feature -- Mapping helper: uri agent
|
||||||
|
|
||||||
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]])
|
map_uri_template_agent (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
require
|
require
|
||||||
a_tpl_attached: a_tpl /= Void
|
a_tpl_attached: a_tpl /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
do
|
do
|
||||||
map_uri_template_agent_with_request_methods (a_tpl, proc, Void)
|
map_uri_template (a_tpl, create {WSF_URI_TEMPLATE_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_uri_template_agent_with_request_methods (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
map_uri_template_agent_with_request_methods (a_tpl: READABLE_STRING_8; proc: PROCEDURE [ANY, TUPLE [ctx: C; req: WSF_REQUEST; res: WSF_RESPONSE]]; rqst_methods: detachable WSF_REQUEST_METHODS)
|
||||||
|
obsolete
|
||||||
|
"Use directly `make_uri_template_agent' [June/2015]"
|
||||||
require
|
require
|
||||||
a_tpl_attached: a_tpl /= Void
|
a_tpl_attached: a_tpl /= Void
|
||||||
proc_attached: proc /= Void
|
proc_attached: proc /= Void
|
||||||
do
|
do
|
||||||
map_uri_template_with_request_methods (a_tpl, create {WSF_URI_TEMPLATE_AGENT_CONTEXT_HANDLER [C] }.make (proc), rqst_methods)
|
map_uri_template_agent (a_tpl, proc, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2014, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Olivier Ligot, Colin Adams, Eiffel Software and others"
|
||||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
Reference in New Issue
Block a user