Updated simple_ssl example to use directly the standalone connector,
and use the new WSF_STANDALONE_SERVICE_OPTIONS class. Added WSF_STANDALONE_SERVICE to make it easy to use directly.
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
note
|
note
|
||||||
description : "simple application root class"
|
description: "simple application root class"
|
||||||
date : "$Date$"
|
date: "$Date$"
|
||||||
revision : "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
APPLICATION
|
APPLICATION
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_DEFAULT_SERVICE [APPLICATION_EXECUTION]
|
WSF_STANDALONE_SERVICE [APPLICATION_EXECUTION]
|
||||||
redefine
|
redefine
|
||||||
initialize
|
initialize
|
||||||
end
|
end
|
||||||
@@ -19,11 +19,17 @@ feature {NONE} -- Initialization
|
|||||||
|
|
||||||
initialize
|
initialize
|
||||||
-- Initialize current service.
|
-- Initialize current service.
|
||||||
|
local
|
||||||
|
opts: WSF_STANDALONE_SERVICE_OPTIONS
|
||||||
do
|
do
|
||||||
-- Specific to `standalone' connector (the EiffelWeb server).
|
-- Specific to `standalone' connector (the EiffelWeb server).
|
||||||
-- See `{WSF_STANDALONE_SERVICE_LAUNCHER}.initialize'
|
-- See `{WSF_STANDALONE_SERVICE_LAUNCHER}.initialize'
|
||||||
set_service_option ("port", 9090)
|
create opts
|
||||||
import_service_options (create {WSF_SERVICE_LAUNCHER_OPTIONS_FROM_INI}.make_from_file ("simple.ini"))
|
opts.port := 9090
|
||||||
|
opts.socket_recv_timeout := 5 -- seconds
|
||||||
|
|
||||||
|
opts.import_ini_file_options ("simple.ini")
|
||||||
|
import_service_options (opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<setting name="concurrency" value="scoop"/>
|
<setting name="concurrency" value="scoop"/>
|
||||||
<variable name="ssl_enabled" value="true"/>
|
<variable name="ssl_enabled" value="true"/>
|
||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf"/>
|
<library name="wsf_standalone" location="..\..\library\server\wsf\connector\standalone-safe.ecf"/>
|
||||||
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
|
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
|
||||||
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf"/>
|
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf"/>
|
||||||
<cluster name="simple" location=".\" recursive="true"/>
|
<cluster name="simple" location=".\" recursive="true"/>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
note
|
||||||
|
description: "[
|
||||||
|
Service using standalone connector launcher.
|
||||||
|
]"
|
||||||
|
author: "$Author$"
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
class
|
||||||
|
WSF_STANDALONE_SERVICE [G -> WSF_EXECUTION create make end]
|
||||||
|
|
||||||
|
inherit
|
||||||
|
WSF_LAUNCHABLE_SERVICE
|
||||||
|
|
||||||
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
|
launch (opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS)
|
||||||
|
local
|
||||||
|
l_launcher: WSF_STANDALONE_SERVICE_LAUNCHER [G]
|
||||||
|
do
|
||||||
|
create l_launcher.make_and_launch (opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user