Migrated most of the example and library to new design.
This commit is contained in:
@@ -10,33 +10,38 @@ note
|
||||
revision: "$Revision: 36 $"
|
||||
|
||||
deferred class
|
||||
APPLICATION_LAUNCHER_I
|
||||
APPLICATION_LAUNCHER_I [G -> WSF_EXECUTION create make end]
|
||||
|
||||
inherit
|
||||
SHARED_EXECUTION_ENVIRONMENT
|
||||
|
||||
feature -- Execution
|
||||
|
||||
launch (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
-- Launch Web Server Application using `a_service' and optionals `opts'.
|
||||
launch (opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
-- Launch Web Server Application using optionals `opts'.
|
||||
local
|
||||
l_id: like launcher_id
|
||||
launcher: WSF_SERVICE_LAUNCHER
|
||||
do
|
||||
l_id := launcher_id
|
||||
if l_id = Void then
|
||||
if not attached launcher_id as l_id then
|
||||
{unless condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal}
|
||||
io.error.put_string ("Application launcher not found!%N")
|
||||
(create {EXCEPTIONS}).die (-1){/literal}{/unless}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal}
|
||||
-- Choose a default -> standalone
|
||||
create {WSF_NINO_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}{literal}
|
||||
elseif is_libfcgi_launcher_id (l_id) then
|
||||
create {WSF_LIBFCGI_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}{literal}
|
||||
elseif is_cgi_launcher_id (l_id) then
|
||||
create {WSF_CGI_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
create {WSF_STANDALONE_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}{literal}
|
||||
elseif is_nino_launcher_id (l_id) then
|
||||
create {WSF_NINO_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}{/if}
|
||||
create {WSF_STANDALONE_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_libfcgi ~ $WIZ_YES"}{literal}
|
||||
elseif is_libfcgi_launcher_id (l_id) then
|
||||
create {WSF_LIBFCGI_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}{literal}
|
||||
elseif is_cgi_launcher_id (l_id) then
|
||||
create {WSF_CGI_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if}
|
||||
{if condition="$WIZ.connectors.use_nino ~ $WIZ_YES"}{literal}
|
||||
elseif is_nino_launcher_id (l_id) then
|
||||
create {WSF_NINO_SERVICE_LAUNCHER} launcher.make_and_launch (opts){/literal}{/if}
|
||||
{literal}
|
||||
else
|
||||
io.error.put_string ("Application launcher not found!%N")
|
||||
@@ -48,11 +53,8 @@ feature -- Execution
|
||||
-- Launcher id based on the executable extension name if any.
|
||||
-- This can be redefine to customize for your application.
|
||||
--| ex: nino, cgi, libfcgi or Void.
|
||||
local
|
||||
sh_exec: SHARED_EXECUTION_ENVIRONMENT
|
||||
do
|
||||
create sh_exec
|
||||
if attached (create {PATH}.make_from_string (sh_exec.execution_environment.arguments.command_name)).extension as ext then
|
||||
if attached (create {PATH}.make_from_string (execution_environment.arguments.command_name)).extension as ext then
|
||||
Result := ext
|
||||
end
|
||||
end
|
||||
@@ -60,10 +62,15 @@ feature -- Execution
|
||||
feature -- Status report
|
||||
{/literal}
|
||||
{if condition="$WIZ.connectors.use_standalone ~ $WIZ_YES"}
|
||||
is_nino_launcher_id (a_id: READABLE_STRING_GENERAL): BOOLEAN
|
||||
do
|
||||
Result := a_id.is_case_insensitive ("standalone")
|
||||
end{/if}
|
||||
|
||||
{if condition="$WIZ.connectors.use_nino ~ $WIZ_YES"}
|
||||
is_nino_launcher_id (a_id: READABLE_STRING_GENERAL): BOOLEAN
|
||||
do
|
||||
Result := a_id.is_case_insensitive ("nino")
|
||||
or a_id.is_case_insensitive ("standalone")
|
||||
end{/if}
|
||||
|
||||
{if condition="$WIZ.connectors.use_cgi ~ $WIZ_YES"}
|
||||
@@ -79,6 +86,5 @@ feature -- Status report
|
||||
or a_id.is_case_insensitive ("fcgi")
|
||||
end{/if}
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ note
|
||||
revision: "$Revision: 36 $"
|
||||
|
||||
class
|
||||
APPLICATION_LAUNCHER
|
||||
APPLICATION_LAUNCHER [G -> WSF_EXECUTION create make end]
|
||||
|
||||
inherit
|
||||
APPLICATION_LAUNCHER_I
|
||||
APPLICATION_LAUNCHER_I [G]
|
||||
|
||||
feature -- Custom
|
||||
|
||||
|
||||
@@ -10,21 +10,21 @@ note
|
||||
revision: "$Revision: 36 $"
|
||||
|
||||
deferred class
|
||||
APPLICATION_LAUNCHER_I
|
||||
APPLICATION_LAUNCHER_I [G -> WSF_EXECUTION create make end]
|
||||
|
||||
feature -- Execution
|
||||
|
||||
launch (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
launch (opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||
-- Launch Web Server Application using `a_service' and optionals `opts'.
|
||||
local
|
||||
launcher: WSF_SERVICE_LAUNCHER
|
||||
launcher: WSF_SERVICE_LAUNCHER [G]
|
||||
do
|
||||
{literal}
|
||||
create {WSF_DEFAULT_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts){/literal}
|
||||
create {WSF_DEFAULT_SERVICE_LAUNCHER [G]} launcher.make_and_launch (opts){/literal}
|
||||
end
|
||||
|
||||
launcher_id: detachable READABLE_STRING_GENERAL
|
||||
do
|
||||
once
|
||||
-- Not used for default connector selection.
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user