Migrated most of the example and library to new design.
This commit is contained in:
@@ -16,10 +16,10 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_OPENSHIFT_SERVICE_LAUNCHER
|
||||
WSF_OPENSHIFT_SERVICE_LAUNCHER [G -> WSF_EXECUTION create make end]
|
||||
|
||||
inherit
|
||||
WSF_NINO_SERVICE_LAUNCHER
|
||||
WSF_NINO_SERVICE_LAUNCHER [G]
|
||||
redefine
|
||||
initialize
|
||||
end
|
||||
@@ -31,9 +31,7 @@ inherit
|
||||
|
||||
create
|
||||
make,
|
||||
make_and_launch,
|
||||
make_callback,
|
||||
make_callback_and_launch
|
||||
make_and_launch
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
@@ -86,7 +84,7 @@ feature {NONE} -- Implementation
|
||||
|
||||
|
||||
;note
|
||||
copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_httpd" uuid="9BF2D71A-0986-4025-9C97-15B65F07C568" library_target="wsf_httpd">
|
||||
<target name="wsf_httpd">
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_standalone" uuid="9BF2D71A-0986-4025-9C97-15B65F07C568" library_target="wsf_standalone">
|
||||
<target name="wsf_standalone">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
@@ -10,13 +10,13 @@
|
||||
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="connector_httpd" location="..\..\ewsgi\connectors\httpd\httpd-safe.ecf"/>
|
||||
<library name="connector_standalone" location="..\..\ewsgi\connectors\standalone\standalone-safe.ecf"/>
|
||||
<library name="encoder" location="..\..\..\text\encoder\encoder-safe.ecf" readonly="false"/>
|
||||
<library name="error" location="..\..\..\utility\general\error\error-safe.ecf"/>
|
||||
<library name="ewsgi" location="..\..\ewsgi\ewsgi-safe.ecf"/>
|
||||
<library name="http" location="..\..\..\network\protocol\http\http-safe.ecf"/>
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time-safe.ecf"/>
|
||||
<library name="wsf" location="..\wsf-safe.ecf"/>
|
||||
<cluster name="wsf_httpd" location=".\httpd\" recursive="true"/>
|
||||
<cluster name="wsf_standalone" location=".\standalone\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
22
library/server/wsf/connector/standalone.ecf
Normal file
22
library/server/wsf/connector/standalone.ecf
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="wsf_standalone" uuid="9BF2D71A-0986-4025-9C97-15B65F07C568" library_target="wsf_standalone">
|
||||
<target name="wsf_standalone">
|
||||
<root all_classes="true"/>
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/\.git$</exclude>
|
||||
<exclude>/\.svn$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true" full_class_checking="true" void_safety="none" syntax="provisional">
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="connector_standalone" location="..\..\ewsgi\connectors\standalone\standalone.ecf"/>
|
||||
<library name="encoder" location="..\..\..\text\encoder\encoder.ecf" readonly="false"/>
|
||||
<library name="error" location="..\..\..\utility\general\error\error.ecf"/>
|
||||
<library name="ewsgi" location="..\..\ewsgi\ewsgi.ecf"/>
|
||||
<library name="http" location="..\..\..\network\protocol\http\http.ecf"/>
|
||||
<library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
|
||||
<library name="wsf" location="..\wsf.ecf"/>
|
||||
<cluster name="wsf_standalone" location=".\standalone\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
@@ -8,8 +8,8 @@ note
|
||||
The httpd default connector support options:
|
||||
port: numeric such as 8099 (or equivalent string as "8099")
|
||||
base: base_url (very specific to standalone server)
|
||||
verbose: to display verbose output, useful for Nino
|
||||
force_single_threaded: use only one thread, useful for Nino
|
||||
verbose: to display verbose output, useful for standalone connector
|
||||
force_single_threaded: use only one thread, useful for standalone connector
|
||||
|
||||
check WSF_SERVICE_LAUNCHER for more documentation
|
||||
]"
|
||||
@@ -17,7 +17,7 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_HTTPD_SERVICE_LAUNCHER [G -> WSF_EXECUTION create make end]
|
||||
WSF_STANDALONE_SERVICE_LAUNCHER [G -> WSF_EXECUTION create make end]
|
||||
|
||||
inherit
|
||||
WSF_SERVICE_LAUNCHER [G]
|
||||
@@ -71,7 +71,6 @@ feature {NONE} -- Initialization
|
||||
create conn.make
|
||||
connector := conn
|
||||
conn.on_launched_actions.extend (agent on_launched)
|
||||
conn.on_stopped_actions.extend (agent on_stopped)
|
||||
conn.set_base (base_url)
|
||||
|
||||
update_configuration (conn.configuration)
|
||||
@@ -88,7 +87,6 @@ feature -- Execution
|
||||
if attached server_name as l_server_name then
|
||||
cfg.set_http_server_name (l_server_name)
|
||||
end
|
||||
-- conn.set_port_number (port_number)
|
||||
cfg.http_server_port := port_number
|
||||
end
|
||||
|
||||
@@ -102,7 +100,7 @@ feature -- Execution
|
||||
conn.set_base (base_url)
|
||||
debug ("nino")
|
||||
if verbose then
|
||||
io.error.put_string ("Launching Nino web server on port " + port_number.out)
|
||||
io.error.put_string ("Launching standalone web server on port " + port_number.out)
|
||||
if attached server_name as l_name then
|
||||
io.error.put_string ("%N http://" + l_name + ":" + port_number.out + "/" + base_url + "%N")
|
||||
else
|
||||
@@ -116,24 +114,19 @@ feature -- Execution
|
||||
|
||||
feature -- Callback
|
||||
|
||||
on_launched_actions: ACTION_SEQUENCE [TUPLE [WGI_CONNECTOR]]
|
||||
on_launched_actions: ACTION_SEQUENCE [TUPLE [WGI_STANDALONE_CONNECTOR [G]]]
|
||||
-- Actions triggered when launched
|
||||
|
||||
on_stopped_actions: ACTION_SEQUENCE [TUPLE [WGI_CONNECTOR]]
|
||||
on_stopped_actions: ACTION_SEQUENCE [TUPLE [WGI_STANDALONE_CONNECTOR [G]]]
|
||||
-- Actions triggered when stopped
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
on_launched (conn: WGI_CONNECTOR)
|
||||
on_launched (conn: WGI_STANDALONE_CONNECTOR [G])
|
||||
do
|
||||
on_launched_actions.call ([conn])
|
||||
end
|
||||
|
||||
on_stopped (conn: WGI_CONNECTOR)
|
||||
do
|
||||
on_stopped_actions.call ([conn])
|
||||
end
|
||||
|
||||
port_number: INTEGER
|
||||
|
||||
server_name: detachable READABLE_STRING_8
|
||||
@@ -146,7 +139,7 @@ feature {NONE} -- Implementation
|
||||
|
||||
feature -- Status report
|
||||
|
||||
connector: WGI_HTTPD_CONNECTOR [G]
|
||||
connector: WGI_STANDALONE_CONNECTOR [G]
|
||||
-- Default connector
|
||||
|
||||
launchable: BOOLEAN
|
||||
Reference in New Issue
Block a user