Added "on_handler_mapped" callback
to allow any REQUEST_HANDLER to record the existing routes.
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
<exclude>/.svn$</exclude>
|
<exclude>/.svn$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all">
|
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
|
||||||
<assertions precondition="true"/>
|
<assertions precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<exclude>/EIFGENs$</exclude>
|
<exclude>/EIFGENs$</exclude>
|
||||||
<exclude>/.svn$</exclude>
|
<exclude>/.svn$</exclude>
|
||||||
</file_rule>
|
</file_rule>
|
||||||
<option warning="true" full_class_checking="true">
|
<option warning="true" full_class_checking="true" syntax="provisional">
|
||||||
<assertions precondition="true"/>
|
<assertions precondition="true"/>
|
||||||
</option>
|
</option>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||||
|
|||||||
@@ -65,6 +65,13 @@ feature -- Execution: report
|
|||||||
result_attached: Result /= Void
|
result_attached: Result /= Void
|
||||||
end
|
end
|
||||||
|
|
||||||
|
feature {REQUEST_ROUTER} -- Routes change
|
||||||
|
|
||||||
|
on_handler_mapped (a_resource: READABLE_STRING_8; a_rqst_methods: detachable ARRAY [READABLE_STRING_8])
|
||||||
|
-- Callback called when a router map a route to Current handler
|
||||||
|
do
|
||||||
|
end
|
||||||
|
|
||||||
note
|
note
|
||||||
copyright: "2011-2011, Eiffel Software and others"
|
copyright: "2011-2011, 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)"
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ feature -- Registration
|
|||||||
map_with_request_methods (p: READABLE_STRING_8; h: H; rqst_methods: detachable ARRAY [READABLE_STRING_8])
|
map_with_request_methods (p: READABLE_STRING_8; h: H; rqst_methods: detachable ARRAY [READABLE_STRING_8])
|
||||||
do
|
do
|
||||||
handlers.force ([h, p, formatted_request_methods (rqst_methods)])
|
handlers.force ([h, p, formatted_request_methods (rqst_methods)])
|
||||||
|
h.on_handler_mapped (p, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {NONE} -- Access: Implementation
|
feature {NONE} -- Access: Implementation
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ feature -- Registration
|
|||||||
do
|
do
|
||||||
handlers.force ([h, uri.template, formatted_request_methods (rqst_methods)])
|
handlers.force ([h, uri.template, formatted_request_methods (rqst_methods)])
|
||||||
templates.force (uri, uri.template)
|
templates.force (uri, uri.template)
|
||||||
|
h.on_handler_mapped (uri.template, rqst_methods)
|
||||||
end
|
end
|
||||||
|
|
||||||
map_with_request_methods (tpl: READABLE_STRING_8; h: H; rqst_methods: detachable ARRAY [READABLE_STRING_8])
|
map_with_request_methods (tpl: READABLE_STRING_8; h: H; rqst_methods: detachable ARRAY [READABLE_STRING_8])
|
||||||
|
|||||||
Reference in New Issue
Block a user