Log when a persistent connection is reused.

Use anchor type on `{WGI_STANDALONE_CONNECTOR}.configuration` and `{WSF_STANDALONE_SERVICE_LAUNCHER}.connector`.
Add access to the socket of standalone input stream from `{WSF_STANDALONE_CONNECTOR_ACCESS}`.
Removed a useless redefination in `WSF_EXECUTION`.
This commit is contained in:
2016-06-21 23:36:22 +02:00
parent 0cecb9594c
commit 8ba74e1c90
7 changed files with 30 additions and 13 deletions

View File

@@ -202,6 +202,8 @@ feature -- Execution
n := n + 1 n := n + 1
if n >= m then if n >= m then
is_next_persistent_connection_supported := False is_next_persistent_connection_supported := False
elseif n > 1 and is_verbose then
log ("Reuse connection (" + n.out + ")", information_level)
end end
-- FIXME: it seems to be called one more time, mostly to see this is done. -- FIXME: it seems to be called one more time, mostly to see this is done.
execute_request execute_request

View File

@@ -1,6 +1,6 @@
note note
description: "[ description: "[
Standalone Web Server connector Standalone Web Server connector.
]" ]"
date: "$Date$" date: "$Date$"
revision: "$Revision$" revision: "$Revision$"
@@ -20,7 +20,7 @@ feature {NONE} -- Initialization
make make
-- Create current standalone connector. -- Create current standalone connector.
local local
fac: separate WGI_HTTPD_REQUEST_HANDLER_FACTORY [G] fac: like request_handler_factory
do do
-- Callbacks -- Callbacks
create on_launched_actions create on_launched_actions
@@ -51,7 +51,7 @@ feature {NONE} -- Separate helper
a_server.set_observer (observer) a_server.set_observer (observer)
end end
update_factory (conn: detachable separate WGI_STANDALONE_CONNECTOR [G]; fac: separate WGI_HTTPD_REQUEST_HANDLER_FACTORY [G]; a_conf: separate HTTPD_CONFIGURATION) update_factory (conn: detachable separate WGI_STANDALONE_CONNECTOR [G]; fac: separate WGI_HTTPD_REQUEST_HANDLER_FACTORY [G]; a_conf: like configuration)
do do
fac.update_with (conn, a_conf) fac.update_with (conn, a_conf)
end end
@@ -63,11 +63,17 @@ feature {NONE} -- Separate helper
feature -- Access feature -- Access
name: STRING_8 = "httpd" name: STRING_8
-- Name of Current connector -- Name of Current connector
once
Result := "httpd"
end
version: STRING_8 = "0.1" version: STRING_8
-- Version of Current connector -- Version of Current connector
once
Result := "1.0"
end
feature -- Access feature -- Access
@@ -238,7 +244,7 @@ feature {NONE} -- Implementation: element change
note note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[ source: "[
Eiffel Software Eiffel Software

View File

@@ -0,0 +1,11 @@
note
description: "[
Interface to access protected feature from {WGI_STANDALONE_CONNECTOR}.
]"
date: "$Date$"
revision: "$Revision$"
deferred class
WGI_STANDALONE_CONNECTOR_ACCESS
end

View File

@@ -24,7 +24,7 @@ feature {NONE} -- Initialization
set_source (a_source) set_source (a_source)
end end
feature {WGI_STANDALONE_CONNECTOR, WGI_SERVICE} -- Nino feature {WGI_STANDALONE_CONNECTOR, WGI_SERVICE, WGI_STANDALONE_CONNECTOR_ACCESS} -- Standalone
set_source (i: like source) set_source (i: like source)
do do

View File

@@ -10,12 +10,11 @@
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/> <library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="connector_standalone" location="standalone-safe.ecf" readonly="false"/> <library name="connector_standalone" location="standalone-safe.ecf" readonly="false"/>
<library name="ewsgi" location="..\..\ewsgi-safe.ecf" readonly="false"/> <library name="ewsgi" location="..\..\ewsgi-safe.ecf" readonly="false"/>
<library name="httpd_edit" location="src\httpd\httpd-safe.ecf" readonly="false"> <library name="httpd_edit" location="lib\httpd\httpd-safe.ecf" readonly="false">
<option debug="true"> <option debug="true">
<debug name="dbglog" enabled="true"/> <debug name="dbglog" enabled="true"/>
</option> </option>
</library> </library>
<library name="net_ssl_edit" location="$ISE_LIBRARY\unstable\library\network\socket\netssl\net_ssl-safe.ecf" readonly="false"/>
<library name="wsf" location="..\..\..\wsf\wsf-safe.ecf" readonly="false"/> <library name="wsf" location="..\..\..\wsf\wsf-safe.ecf" readonly="false"/>
<cluster name="tests" location="tests\" recursive="true"/> <cluster name="tests" location="tests\" recursive="true"/>
</target> </target>

View File

@@ -153,15 +153,15 @@ feature -- Execution
feature -- Callback feature -- Callback
on_launched_actions: ACTION_SEQUENCE [TUPLE [WGI_STANDALONE_CONNECTOR [G]]] on_launched_actions: ACTION_SEQUENCE [TUPLE [like connector]]
-- Actions triggered when launched -- Actions triggered when launched
on_stopped_actions: ACTION_SEQUENCE [TUPLE [WGI_STANDALONE_CONNECTOR [G]]] on_stopped_actions: ACTION_SEQUENCE [TUPLE [like connector]]
-- Actions triggered when stopped -- Actions triggered when stopped
feature {NONE} -- Implementation feature {NONE} -- Implementation
on_launched (conn: WGI_STANDALONE_CONNECTOR [G]) on_launched (conn: like connector)
do do
on_launched_actions.call ([conn]) on_launched_actions.call ([conn])
end end

View File

@@ -14,7 +14,6 @@ inherit
make_from_execution as make_from_wgi_execution make_from_execution as make_from_wgi_execution
redefine redefine
make, make,
execute,
clean, clean,
is_valid_end_of_execution is_valid_end_of_execution
end end