Breaking changes:
added `a_request_methods' argument to WSF_ROUTER_SELF_DOCUMENTATION_HANDLER.mapping_documentation added similar argument to WSF_ROUTER_SELF_DOCUMENTATION_ROUTER_MAPPING.documentation Renamed WSF_ROUTER_METHODS as WSF_REQUEST_METHODS Enhanced WSF_REQUEST_METHODS with new has_... function Added WSF_ROUTER_VISITOR and WSF_ROUTER_ITERATOR that may be useful to iterate inside the router. we may improve the implementation of the router using those visitors in the future. Improved the WSF_DEFAULT_RESPONSE to embedded suggested items (typically based on pseudo self documented router)
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
note
|
||||
description: "Summary description for {WSF_ROUTER_AGENT_ITERATOR}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_ROUTER_AGENT_ITERATOR
|
||||
|
||||
inherit
|
||||
WSF_ROUTER_ITERATOR
|
||||
redefine
|
||||
default_create,
|
||||
process_router,
|
||||
process_item,
|
||||
process_mapping,
|
||||
process_handler
|
||||
end
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
default_create
|
||||
do
|
||||
Precursor
|
||||
create on_router_actions.make
|
||||
create on_item_actions.make
|
||||
create on_mapping_actions.make
|
||||
create on_handler_actions.make
|
||||
end
|
||||
|
||||
feature -- Actions
|
||||
|
||||
on_router_actions: ACTION_SEQUENCE [TUPLE [WSF_ROUTER]]
|
||||
|
||||
on_item_actions: ACTION_SEQUENCE [TUPLE [WSF_ROUTER_ITEM]]
|
||||
|
||||
on_mapping_actions: ACTION_SEQUENCE [TUPLE [WSF_ROUTER_MAPPING]]
|
||||
|
||||
on_handler_actions: ACTION_SEQUENCE [TUPLE [WSF_HANDLER]]
|
||||
|
||||
feature -- Visitor
|
||||
|
||||
process_router (r: WSF_ROUTER)
|
||||
do
|
||||
on_router_actions.call ([r])
|
||||
Precursor (r)
|
||||
end
|
||||
|
||||
process_item (i: WSF_ROUTER_ITEM)
|
||||
do
|
||||
on_item_actions.call ([i])
|
||||
Precursor (i)
|
||||
end
|
||||
|
||||
process_mapping (m: WSF_ROUTER_MAPPING)
|
||||
do
|
||||
on_mapping_actions.call ([m])
|
||||
Precursor (m)
|
||||
end
|
||||
|
||||
process_handler (h: WSF_HANDLER)
|
||||
do
|
||||
on_handler_actions.call ([h])
|
||||
Precursor (h)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user