Added a few descriptions and comments.

This commit is contained in:
2015-04-07 14:13:41 +02:00
parent 3c7ca1b15b
commit 14c1faa124
10 changed files with 44 additions and 16 deletions

View File

@@ -46,8 +46,6 @@ feature -- Access
-- User with id `a_id' or name `a_name'.
require
a_id > 0 xor a_name /= Void
local
n: like {USER}.name
do
if a_id > 0 then
Result := user_by_id (a_id)

View File

@@ -24,6 +24,7 @@ feature -- Access
feature -- Execution
launch
-- Launch execution of CGI application.
local
req: WGI_REQUEST_FROM_TABLE
res: detachable WGI_RESPONSE_STREAM
@@ -51,6 +52,7 @@ feature -- Execution
end
process_rescue (res: detachable WGI_RESPONSE)
-- Handle rescued execution of current request.
do
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
if res /= Void then
@@ -68,7 +70,7 @@ feature -- Execution
end
note
copyright: "2011-2013, Eiffel Software and others"
copyright: "2011-2015, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -22,6 +22,7 @@ inherit
feature {NONE} -- Initialization
default_create
-- Create libFCGI connector.
do
Precursor {WGI_CONNECTOR}
create fcgi.make
@@ -40,6 +41,7 @@ feature -- Access
feature -- Server
launch
-- Launch libFCGI server.
local
res: INTEGER
do
@@ -56,6 +58,7 @@ feature -- Server
feature -- Execution
process_fcgi_request (vars: STRING_TABLE [READABLE_STRING_8]; a_input: like input; a_output: like output)
-- Process the request with variables `vars', input `a_input' and output `a_output'.
local
req: WGI_REQUEST_FROM_TABLE
res: detachable WGI_RESPONSE_STREAM
@@ -82,8 +85,9 @@ feature -- Execution
retry
end
end
process_rescue (res: detachable WGI_RESPONSE)
-- Handle rescued execution of current request.
do
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
if res /= Void then
@@ -116,7 +120,7 @@ invariant
fcgi_attached: fcgi /= Void
note
copyright: "2011-2013, Eiffel Software and others"
copyright: "2011-2015, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -23,6 +23,7 @@ feature {NONE} -- Initialization
feature -- Access
is_shutdown_requested: BOOLEAN
-- <Precursor>
shutdown_requested (a_server: like server): BOOLEAN
do

View File

@@ -92,17 +92,13 @@ feature {HTTPD_SERVER_I} -- Execution
end
process_handler (hdl: separate HTTPD_REQUEST_HANDLER)
-- Process request handler `hdl' concurrently.
require
hdl.is_connected
do
hdl.safe_execute
end
separate_client_socket (hdl: separate HTTPD_REQUEST_HANDLER): separate HTTPD_STREAM_SOCKET
do
Result := hdl.client_socket
end
feature {HTTPD_SERVER_I} -- Status report
wait_for_completion
@@ -121,6 +117,12 @@ feature {HTTPD_SERVER_I} -- Status report
feature {NONE} -- Implementation
separate_client_socket (hdl: separate HTTPD_REQUEST_HANDLER): separate HTTPD_STREAM_SOCKET
-- Client socket for handler `hdl'.
do
Result := hdl.client_socket
end
pool: separate CONCURRENT_POOL [HTTPD_REQUEST_HANDLER]
-- Pool of separate connection handlers.

View File

@@ -23,6 +23,7 @@ inherit
feature {CONCURRENT_POOL, HTTPD_CONNECTION_HANDLER_I} -- Basic operation
release
-- <Precursor>
local
d: STRING
do

View File

@@ -24,24 +24,32 @@ feature {NONE} -- Initialization
feature -- Access
count: INTEGER
-- Number of concurrent items managed by Current pool.
capacity: INTEGER
-- Maximum number of concurrent items managed by Current pool.
feature -- Status report
is_full: BOOLEAN
-- Pool is full?
do
Result := count >= capacity
end
is_empty: BOOLEAN
-- No concurrent item waiting in current pool.
do
Result := count = 0
end
capacity: INTEGER
stop_requested: BOOLEAN
-- Current pool received a request to terminate.
feature -- Access
separate_item (a_factory: separate CONCURRENT_POOL_FACTORY [G]): detachable separate G
-- Reused, or new separate item of type {G} created by `a_factory'.
require
is_not_full: not is_full
local
@@ -94,6 +102,7 @@ feature -- Access
feature -- Basic operation
gracefull_stop
-- Request the Current pool to terminate.
do
stop_requested := True
end
@@ -101,8 +110,10 @@ feature -- Basic operation
feature {NONE} -- Internal
items: SPECIAL [detachable separate G]
-- List of concurrent items.
busy_items: SPECIAL [BOOLEAN]
-- Map of items being proceed.
feature {CONCURRENT_POOL_ITEM} -- Change
@@ -140,6 +151,7 @@ feature {CONCURRENT_POOL_ITEM} -- Change
feature -- Change
set_count (n: INTEGER)
-- Set capacity of Current pool to `n'.
local
g: detachable separate G
do
@@ -149,6 +161,7 @@ feature -- Change
end
terminate
-- Terminate current pool.
local
l_items: like items
do
@@ -159,6 +172,7 @@ feature -- Change
feature {NONE} -- Implementation
register_item (a_item: separate G)
-- Adopt `a_item' in current pool.
do
a_item.set_pool (Current)
end

View File

@@ -25,6 +25,7 @@ feature {CONCURRENT_POOL} -- Change
feature {CONCURRENT_POOL, HTTPD_CONNECTION_HANDLER_I} -- Basic operation
release
-- Release Current pool item from associated pool.
do
if attached pool as p then
pool_release (p)

View File

@@ -5,7 +5,7 @@ note
revision: "$Revision$"
class
WSF_WIDGET_AGENT_TABLE [G]
WSF_WIDGET_AGENT_TABLE [G -> detachable ANY]
inherit
WSF_WIDGET

View File

@@ -1,5 +1,5 @@
<?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="all" uuid="0562209B-4C68-4E77-8B57-13CBF53D05BD" library_target="all">
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="all" uuid="0562209B-4C68-4E77-8B57-13CBF53D05BD" library_target="all">
<description>Integration project including many lib</description>
<target name="all">
<root all_classes="true"/>
@@ -51,14 +51,19 @@
<library name="wsf_cgi" location="..\library\server\wsf\connector\cgi-safe.ecf" readonly="false"/>
<library name="wsf_extension" location="..\library\server\wsf\wsf_extension-safe.ecf" readonly="false"/>
<library name="wsf_html" location="..\library\server\wsf_html\wsf_html-safe.ecf" readonly="false"/>
<library name="wsf_js_widget" location="..\draft\library\server\wsf_js_widget\wsf_js_widget-safe.ecf" readonly="false"/>
<library name="wsf_js_widget_demo" location="..\draft\library\server\wsf_js_widget\examples\demo\demo.ecf" readonly="false"/>
<library name="wsf_libfcgi" location="..\library\server\wsf\connector\libfcgi-safe.ecf" readonly="false"/>
<library name="wsf_nino" location="..\library\server\wsf\connector\nino-safe.ecf" readonly="false"/>
<library name="wsf_openshift" location="..\library\server\wsf\connector\openshift-safe.ecf" readonly="false"/>
<library name="wsf_policy_driven" location="..\library\server\wsf\wsf_policy_driven-safe.ecf" readonly="false"/>
<library name="wsf_router_context" location="..\library\server\wsf\wsf_router_context-safe.ecf" readonly="false"/>
<library name="wsf_session" location="..\library\server\wsf\wsf_session-safe.ecf" readonly="false"/>
<library name="wsf_js_widget" location="..\draft\library\server\wsf_js_widget\wsf_js_widget-safe.ecf" readonly="false"/>
<library name="wsf_js_widget_demo" location="..\draft\library\server\wsf_js_widget\examples\demo\demo.ecf" readonly="false"/>
</target>
<target name="all_scoop" extends="all">
<description>Compiling with SCOOP concurrency</description>
<root all_classes="true"/>
<setting name="concurrency" value="scoop"/>
</target>
<target name="all_windows" extends="all">
<description>Compiling as Windows , on other platforms than Windows</description>