Added a few descriptions and comments.
This commit is contained in:
@@ -46,8 +46,6 @@ feature -- Access
|
|||||||
-- User with id `a_id' or name `a_name'.
|
-- User with id `a_id' or name `a_name'.
|
||||||
require
|
require
|
||||||
a_id > 0 xor a_name /= Void
|
a_id > 0 xor a_name /= Void
|
||||||
local
|
|
||||||
n: like {USER}.name
|
|
||||||
do
|
do
|
||||||
if a_id > 0 then
|
if a_id > 0 then
|
||||||
Result := user_by_id (a_id)
|
Result := user_by_id (a_id)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ feature -- Access
|
|||||||
feature -- Execution
|
feature -- Execution
|
||||||
|
|
||||||
launch
|
launch
|
||||||
|
-- Launch execution of CGI application.
|
||||||
local
|
local
|
||||||
req: WGI_REQUEST_FROM_TABLE
|
req: WGI_REQUEST_FROM_TABLE
|
||||||
res: detachable WGI_RESPONSE_STREAM
|
res: detachable WGI_RESPONSE_STREAM
|
||||||
@@ -51,6 +52,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
|
|
||||||
process_rescue (res: detachable WGI_RESPONSE)
|
process_rescue (res: detachable WGI_RESPONSE)
|
||||||
|
-- Handle rescued execution of current request.
|
||||||
do
|
do
|
||||||
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
|
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
|
||||||
if res /= Void then
|
if res /= Void then
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ inherit
|
|||||||
feature {NONE} -- Initialization
|
feature {NONE} -- Initialization
|
||||||
|
|
||||||
default_create
|
default_create
|
||||||
|
-- Create libFCGI connector.
|
||||||
do
|
do
|
||||||
Precursor {WGI_CONNECTOR}
|
Precursor {WGI_CONNECTOR}
|
||||||
create fcgi.make
|
create fcgi.make
|
||||||
@@ -40,6 +41,7 @@ feature -- Access
|
|||||||
feature -- Server
|
feature -- Server
|
||||||
|
|
||||||
launch
|
launch
|
||||||
|
-- Launch libFCGI server.
|
||||||
local
|
local
|
||||||
res: INTEGER
|
res: INTEGER
|
||||||
do
|
do
|
||||||
@@ -56,6 +58,7 @@ feature -- Server
|
|||||||
feature -- Execution
|
feature -- Execution
|
||||||
|
|
||||||
process_fcgi_request (vars: STRING_TABLE [READABLE_STRING_8]; a_input: like input; a_output: like output)
|
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
|
local
|
||||||
req: WGI_REQUEST_FROM_TABLE
|
req: WGI_REQUEST_FROM_TABLE
|
||||||
res: detachable WGI_RESPONSE_STREAM
|
res: detachable WGI_RESPONSE_STREAM
|
||||||
@@ -84,6 +87,7 @@ feature -- Execution
|
|||||||
end
|
end
|
||||||
|
|
||||||
process_rescue (res: detachable WGI_RESPONSE)
|
process_rescue (res: detachable WGI_RESPONSE)
|
||||||
|
-- Handle rescued execution of current request.
|
||||||
do
|
do
|
||||||
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
|
if attached (create {EXCEPTION_MANAGER}).last_exception as e and then attached e.trace as l_trace then
|
||||||
if res /= Void then
|
if res /= Void then
|
||||||
@@ -116,7 +120,7 @@ invariant
|
|||||||
fcgi_attached: fcgi /= Void
|
fcgi_attached: fcgi /= Void
|
||||||
|
|
||||||
note
|
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)"
|
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||||
source: "[
|
source: "[
|
||||||
Eiffel Software
|
Eiffel Software
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ feature {NONE} -- Initialization
|
|||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
is_shutdown_requested: BOOLEAN
|
is_shutdown_requested: BOOLEAN
|
||||||
|
-- <Precursor>
|
||||||
|
|
||||||
shutdown_requested (a_server: like server): BOOLEAN
|
shutdown_requested (a_server: like server): BOOLEAN
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -97,19 +97,13 @@ feature {HTTPD_SERVER_I} -- Execution
|
|||||||
end
|
end
|
||||||
|
|
||||||
process_handler (hdl: separate HTTPD_REQUEST_HANDLER)
|
process_handler (hdl: separate HTTPD_REQUEST_HANDLER)
|
||||||
-- Process request handler `hdl' with exclusive access.
|
-- Process request handler `hdl' concurrently.
|
||||||
require
|
require
|
||||||
hdl.is_connected
|
hdl.is_connected
|
||||||
do
|
do
|
||||||
hdl.safe_execute
|
hdl.safe_execute
|
||||||
end
|
end
|
||||||
|
|
||||||
separate_client_socket (hdl: separate HTTPD_REQUEST_HANDLER): separate HTTPD_STREAM_SOCKET
|
|
||||||
-- Separate client socket from a request handler `hdl'.
|
|
||||||
do
|
|
||||||
Result := hdl.client_socket
|
|
||||||
end
|
|
||||||
|
|
||||||
feature {HTTPD_SERVER_I} -- Status report
|
feature {HTTPD_SERVER_I} -- Status report
|
||||||
|
|
||||||
wait_for_completion
|
wait_for_completion
|
||||||
@@ -128,6 +122,12 @@ feature {HTTPD_SERVER_I} -- Status report
|
|||||||
|
|
||||||
feature {NONE} -- Implementation
|
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: separate CONCURRENT_POOL [HTTPD_REQUEST_HANDLER]
|
||||||
-- Pool of separate connection handlers.
|
-- Pool of separate connection handlers.
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ inherit
|
|||||||
feature {CONCURRENT_POOL, HTTPD_CONNECTION_HANDLER_I} -- Basic operation
|
feature {CONCURRENT_POOL, HTTPD_CONNECTION_HANDLER_I} -- Basic operation
|
||||||
|
|
||||||
release
|
release
|
||||||
|
-- <Precursor>
|
||||||
local
|
local
|
||||||
d: STRING
|
d: STRING
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -24,24 +24,32 @@ feature {NONE} -- Initialization
|
|||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
count: INTEGER
|
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
|
is_full: BOOLEAN
|
||||||
|
-- Pool is full?
|
||||||
do
|
do
|
||||||
Result := count >= capacity
|
Result := count >= capacity
|
||||||
end
|
end
|
||||||
|
|
||||||
is_empty: BOOLEAN
|
is_empty: BOOLEAN
|
||||||
|
-- No concurrent item waiting in current pool.
|
||||||
do
|
do
|
||||||
Result := count = 0
|
Result := count = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
capacity: INTEGER
|
|
||||||
|
|
||||||
stop_requested: BOOLEAN
|
stop_requested: BOOLEAN
|
||||||
|
-- Current pool received a request to terminate.
|
||||||
|
|
||||||
feature -- Access
|
feature -- Access
|
||||||
|
|
||||||
separate_item (a_factory: separate CONCURRENT_POOL_FACTORY [G]): detachable separate G
|
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
|
require
|
||||||
is_not_full: not is_full
|
is_not_full: not is_full
|
||||||
local
|
local
|
||||||
@@ -94,6 +102,7 @@ feature -- Access
|
|||||||
feature -- Basic operation
|
feature -- Basic operation
|
||||||
|
|
||||||
gracefull_stop
|
gracefull_stop
|
||||||
|
-- Request the Current pool to terminate.
|
||||||
do
|
do
|
||||||
stop_requested := True
|
stop_requested := True
|
||||||
end
|
end
|
||||||
@@ -101,8 +110,10 @@ feature -- Basic operation
|
|||||||
feature {NONE} -- Internal
|
feature {NONE} -- Internal
|
||||||
|
|
||||||
items: SPECIAL [detachable separate G]
|
items: SPECIAL [detachable separate G]
|
||||||
|
-- List of concurrent items.
|
||||||
|
|
||||||
busy_items: SPECIAL [BOOLEAN]
|
busy_items: SPECIAL [BOOLEAN]
|
||||||
|
-- Map of items being proceed.
|
||||||
|
|
||||||
feature {CONCURRENT_POOL_ITEM} -- Change
|
feature {CONCURRENT_POOL_ITEM} -- Change
|
||||||
|
|
||||||
@@ -140,6 +151,7 @@ feature {CONCURRENT_POOL_ITEM} -- Change
|
|||||||
feature -- Change
|
feature -- Change
|
||||||
|
|
||||||
set_count (n: INTEGER)
|
set_count (n: INTEGER)
|
||||||
|
-- Set capacity of Current pool to `n'.
|
||||||
local
|
local
|
||||||
g: detachable separate G
|
g: detachable separate G
|
||||||
do
|
do
|
||||||
@@ -149,6 +161,7 @@ feature -- Change
|
|||||||
end
|
end
|
||||||
|
|
||||||
terminate
|
terminate
|
||||||
|
-- Terminate current pool.
|
||||||
local
|
local
|
||||||
l_items: like items
|
l_items: like items
|
||||||
do
|
do
|
||||||
@@ -159,6 +172,7 @@ feature -- Change
|
|||||||
feature {NONE} -- Implementation
|
feature {NONE} -- Implementation
|
||||||
|
|
||||||
register_item (a_item: separate G)
|
register_item (a_item: separate G)
|
||||||
|
-- Adopt `a_item' in current pool.
|
||||||
do
|
do
|
||||||
a_item.set_pool (Current)
|
a_item.set_pool (Current)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ feature {CONCURRENT_POOL} -- Change
|
|||||||
feature {CONCURRENT_POOL, HTTPD_CONNECTION_HANDLER_I} -- Basic operation
|
feature {CONCURRENT_POOL, HTTPD_CONNECTION_HANDLER_I} -- Basic operation
|
||||||
|
|
||||||
release
|
release
|
||||||
|
-- Release Current pool item from associated pool.
|
||||||
do
|
do
|
||||||
if attached pool as p then
|
if attached pool as p then
|
||||||
pool_release (p)
|
pool_release (p)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ note
|
|||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
WSF_WIDGET_AGENT_TABLE [G]
|
WSF_WIDGET_AGENT_TABLE [G -> detachable ANY]
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
WSF_WIDGET
|
WSF_WIDGET
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
<?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>
|
<description>Integration project including many lib</description>
|
||||||
<target name="all">
|
<target name="all">
|
||||||
<root all_classes="true"/>
|
<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_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_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_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_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_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_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_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_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_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"/>
|
</target>
|
||||||
<library name="wsf_js_widget_demo" location="..\draft\library\server\wsf_js_widget\examples\demo\demo.ecf" readonly="false"/>
|
<target name="all_scoop" extends="all">
|
||||||
|
<description>Compiling with SCOOP concurrency</description>
|
||||||
|
<root all_classes="true"/>
|
||||||
|
<setting name="concurrency" value="scoop"/>
|
||||||
</target>
|
</target>
|
||||||
<target name="all_windows" extends="all">
|
<target name="all_windows" extends="all">
|
||||||
<description>Compiling as Windows , on other platforms than Windows</description>
|
<description>Compiling as Windows , on other platforms than Windows</description>
|
||||||
|
|||||||
Reference in New Issue
Block a user