Made DEFAULT_SERVICE_LAUNCHER more flexible for the user.

This commit is contained in:
Jocelyn Fiat
2011-12-15 13:30:19 +01:00
parent b6784ee35c
commit bfa620eee3
7 changed files with 262 additions and 120 deletions

View File

@@ -2,7 +2,7 @@ note
description: "[
Component to launch the service using the default connector
which is CGI for this class
CGI for this class
How-to:
@@ -21,40 +21,35 @@ class
DEFAULT_SERVICE_LAUNCHER
inherit
WSF_SERVICE
DEFAULT_SERVICE_LAUNCHER_I
create
make,
make_and_launch,
make_and_launch_with_options
feature {NONE} -- Initialization
make_and_launch (a_action: like action)
local
cgi: WGI_CGI_CONNECTOR
initialize
do
action := a_action
create cgi.make (Current)
cgi.launch
end
make_and_launch_with_options (a_action: like action; a_options: ARRAY [detachable TUPLE [name: READABLE_STRING_GENERAL; value: detachable ANY]])
do
make_and_launch (a_action)
create connector.make (Current)
end
feature -- Execution
action: PROCEDURE [ANY, TUPLE [WSF_REQUEST, WSF_RESPONSE]]
-- Action to be executed on request incoming
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
-- <Precursor>
launch
do
action.call ([req, res])
if attached connector as conn then
conn.launch
end
end
note
feature -- Status report
connector: detachable WGI_CGI_CONNECTOR
-- Default service name
;note
copyright: "2011-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[