Updated various indexing notes.
Removed a few obsolete classes. Cosmetics
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_CGI_CONNECTOR}."
|
||||
description: "CGI connector, see CGI interface, and CGI scripts."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_CGI_ERROR_STREAM."
|
||||
description: "Error stream for CGI connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_CGI_INPUT_STREAM."
|
||||
description: "Input stream for CGI connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_CGI_OUTPUT_STREAM."
|
||||
description: "Output stream for CGI connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_LIBFCGI_CONNECTOR}."
|
||||
description: "libFCGI connector, see libfcgi and http://fastcgi.com"
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_LIBFCGI_INPUT_STREAM."
|
||||
description: "Input stream for libFCGI connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_LIBFCGI_OUTPUT_STREAM}."
|
||||
description: "Output stream for libFCGI connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_NINO_CONNECTOR}."
|
||||
description: "Standalone Eiffel Web nino server connector."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_CGI_ERROR_STREAM."
|
||||
description: "Error stream for Nino connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_NINO_INPUT_STREAM}."
|
||||
description: "Input stream for Nino connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_NINO_OUTPUT_STREAM}."
|
||||
description: "Output stream for Nino connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {WGI_NULL_CONNECTOR}."
|
||||
description: "NULL connector, mainly used for void-safety purpose or testing"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_NULL_FILE_INPUT_STREAM."
|
||||
description: "Null Input stream based on FILE."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_NULL_INPUT_STREAM."
|
||||
description: "Input stream for NULL connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_NULL_OUTPUT_STREAM."
|
||||
description: "Output stream for NULL connector."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for WGI_NULL_STRING_INPUT_STREAM."
|
||||
description: "Input stream for NULL connector based on string body (in memory)."
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONNECTION_HANDLER}."
|
||||
author: ""
|
||||
description: "[
|
||||
Implementation of HTTPD_CONNECTION_HANDLER_I for concurrency mode: none
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -29,7 +30,7 @@ feature -- Access
|
||||
Result := a_server.controller.shutdown_requested
|
||||
end
|
||||
|
||||
feature -- Execution
|
||||
feature {HTTPD_SERVER_I} -- Execution
|
||||
|
||||
accept_incoming_connection (a_listening_socket: HTTPD_STREAM_SOCKET)
|
||||
local
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_REQUEST_HANDLER_FACTORY}."
|
||||
author: ""
|
||||
description: "Implementation of request handler factory for concurrency mode: none"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONNECTION_HANDLER}."
|
||||
description: "[
|
||||
Implementation of HTTPD_CONNECTION_HANDLER_I for concurrency mode: SCOOP
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -36,8 +38,10 @@ feature {NONE} -- Initialization
|
||||
feature -- Access
|
||||
|
||||
is_shutdown_requested: BOOLEAN
|
||||
-- <Precursor>
|
||||
|
||||
max_concurrent_connections (a_server: like server): INTEGER
|
||||
-- Max concurrent connection settings from server `a_server'.
|
||||
do
|
||||
Result := a_server.configuration.max_concurrent_connections
|
||||
end
|
||||
@@ -87,11 +91,6 @@ feature {HTTPD_SERVER_I} -- Execution
|
||||
end
|
||||
end
|
||||
|
||||
separate_client_socket (hdl: separate HTTPD_REQUEST_HANDLER): separate HTTPD_STREAM_SOCKET
|
||||
do
|
||||
Result := hdl.client_socket
|
||||
end
|
||||
|
||||
process_handler (hdl: separate HTTPD_REQUEST_HANDLER)
|
||||
require
|
||||
hdl.is_connected
|
||||
@@ -99,22 +98,28 @@ feature {HTTPD_SERVER_I} -- Execution
|
||||
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
|
||||
-- Wait until Current is ready for shutdown
|
||||
-- Wait until Current is ready for shutdown.
|
||||
do
|
||||
wait_for_pool_completion (pool)
|
||||
end
|
||||
|
||||
wait_for_pool_completion (p: like pool)
|
||||
-- Wait until concurrent pool is empty and terminated.
|
||||
require
|
||||
p.is_empty
|
||||
p.is_empty -- SCOOP wait condition.
|
||||
do
|
||||
p.terminate
|
||||
end
|
||||
|
||||
feature {NONE} -- Access
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
pool: separate CONCURRENT_POOL [HTTPD_REQUEST_HANDLER]
|
||||
-- Pool of separate connection handlers.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_REQUEST_HANDLER_FACTORY}."
|
||||
author: ""
|
||||
description: "Implementation of request handler factory for concurrency mode: SCOOP"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {CONCURRENT_POOL}."
|
||||
author: ""
|
||||
description: "Concurrent pool for SCOOP concurrency mode."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -19,7 +18,6 @@ feature {NONE} -- Initialization
|
||||
do
|
||||
capacity := n
|
||||
create items.make_empty (n)
|
||||
-- create busy_items.make_filled (False, n)
|
||||
create busy_items.make_empty (n)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {CONCURRENT_POOL_FACTORY}."
|
||||
author: ""
|
||||
description: "Factory in charge of creating new concurrent pool item."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {CONCURRENT_POOL_ITEM}."
|
||||
author: ""
|
||||
description: "[
|
||||
Item create by the CONCURRENT_POOL_FACTORY, and managed by the CONCURRENT_POOL
|
||||
for SCOOP concurrency mode.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -10,10 +12,12 @@ deferred class
|
||||
feature {NONE} -- Access
|
||||
|
||||
pool: detachable separate CONCURRENT_POOL [CONCURRENT_POOL_ITEM]
|
||||
-- Associated concurrent pool component.
|
||||
|
||||
feature {CONCURRENT_POOL} -- Change
|
||||
|
||||
set_pool (p: like pool)
|
||||
-- Set associated `pool' to `p'.
|
||||
do
|
||||
pool := p
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONNECTION_HANDLER}."
|
||||
author: ""
|
||||
description: "[
|
||||
Implementation of HTTPD_CONNECTION_HANDLER_I for concurrency mode: Thread
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_REQUEST_HANDLER_FACTORY}."
|
||||
author: ""
|
||||
description: "Implementation of request handler factory for concurrency mode: Thread"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONFIGURATION_I}."
|
||||
description: "Configuration for the standalone HTTPd server."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -24,6 +24,7 @@ feature {NONE} -- Initialization
|
||||
feature -- Access
|
||||
|
||||
Server_details: STRING_8
|
||||
-- Detail of the server.
|
||||
deferred
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONNECTION_HANDLER_I}."
|
||||
author: ""
|
||||
description: "[
|
||||
Interface for the incoming connection handler.
|
||||
|
||||
Each incoming socket connection is processed by
|
||||
an implementation of HTTPD_CONNECTION_HANDLER_I.
|
||||
|
||||
Note there are 3 implementations, one for each concurrent mode: none, thread, scoop.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -23,41 +29,40 @@ feature {NONE} -- Initialization
|
||||
deferred
|
||||
end
|
||||
|
||||
separate_factory (a_server: like server): like factory
|
||||
-- Separate factory from `a_server'.
|
||||
--| required by SCOOP design.
|
||||
do
|
||||
Result := a_server.factory
|
||||
end
|
||||
|
||||
feature {NONE} -- Access
|
||||
|
||||
factory: separate HTTPD_REQUEST_HANDLER_FACTORY
|
||||
-- Request handler factory.
|
||||
|
||||
server: separate HTTPD_SERVER_I
|
||||
-- Associated server.
|
||||
|
||||
feature {HTTPD_SERVER_I} -- Execution
|
||||
|
||||
accept_incoming_connection (a_listening_socket: HTTPD_STREAM_SOCKET)
|
||||
-- Accept incoming connection from `a_listening_socket'.
|
||||
deferred
|
||||
end
|
||||
|
||||
shutdown
|
||||
-- Shutdown server.
|
||||
deferred
|
||||
end
|
||||
|
||||
wait_for_completion
|
||||
-- Wait until Current completed any pending task
|
||||
-- Wait until Current completed any pending task.
|
||||
--| Used for SCOOP synchronisation.
|
||||
deferred
|
||||
end
|
||||
|
||||
feature {HTTPD_SERVER} -- Status report
|
||||
|
||||
is_shutdown_requested: BOOLEAN
|
||||
-- Any request to shutdown the server?
|
||||
deferred
|
||||
end
|
||||
|
||||
feature {NONE} -- Output
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
log (a_message: separate READABLE_STRING_8)
|
||||
-- Log `a_message'
|
||||
@@ -66,6 +71,13 @@ feature {NONE} -- Output
|
||||
separate_server_log (server, a_message)
|
||||
end
|
||||
|
||||
separate_factory (a_server: like server): like factory
|
||||
-- Separate factory from `a_server'.
|
||||
--| required by SCOOP design.
|
||||
do
|
||||
Result := a_server.factory
|
||||
end
|
||||
|
||||
separate_server_log (a_server: like server; a_message: separate READABLE_STRING_8)
|
||||
do
|
||||
a_server.log (a_message)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONTROLLER}."
|
||||
author: ""
|
||||
description: "[
|
||||
Object used to control (i.e shutdown) the server.
|
||||
Mostly needed in SCOOP concurrency mode.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -10,11 +12,15 @@ class
|
||||
feature -- Operation
|
||||
|
||||
shutdown
|
||||
-- Request the associated server to be shutdown.
|
||||
do
|
||||
shutdown_requested := True
|
||||
end
|
||||
|
||||
feature -- Status report.
|
||||
|
||||
shutdown_requested: BOOLEAN
|
||||
-- Shutdown requested.
|
||||
|
||||
;note
|
||||
copyright: "2011-2013, Javier Velilla, Jocelyn Fiat and others"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_DEBUG_FACILITIES}."
|
||||
author: ""
|
||||
description: " Routines used for debug logging."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_LOGGER}."
|
||||
author: ""
|
||||
description: "Logging facilities component"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_SERVER_OBSERVER}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -10,14 +9,18 @@ deferred class
|
||||
feature -- Event
|
||||
|
||||
on_launched (a_port: INTEGER)
|
||||
-- Associated server launched listening on port `a_port'.
|
||||
deferred
|
||||
end
|
||||
|
||||
on_stopped
|
||||
-- Associated server stopped.
|
||||
--| the server may restart itself after being rescued.
|
||||
deferred
|
||||
end
|
||||
|
||||
on_terminated
|
||||
-- Associated server terminated.
|
||||
deferred
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONFIGURATION}."
|
||||
description: "Standalone server configuration (ssl NOT supported)."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -14,7 +14,7 @@ create
|
||||
|
||||
feature -- Status
|
||||
|
||||
Server_details: STRING_8 = "Server : NINO Eiffel Server"
|
||||
Server_details: STRING_8 = "Server: Standalone Eiffel Server"
|
||||
|
||||
has_ssl_support: BOOLEAN = False
|
||||
-- Precursor
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {HTTPD_CONFIGURATION}."
|
||||
description: "Standalone server configuration (ssl supported)."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -25,7 +25,7 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
Server_details: STRING_8 = "Server : NINO Eiffel Server (https)"
|
||||
Server_details: STRING_8 = "Server: Standalone Eiffel Server (https)"
|
||||
|
||||
has_ssl_support: BOOLEAN = True
|
||||
-- Precursor
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
note
|
||||
description: "Summary description for {SSL_TCP_STREAM_SOCKET}."
|
||||
author: ""
|
||||
description: "SSL tcp stream socket."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WGI_STANDALONE_CONNECTOR}."
|
||||
author: ""
|
||||
todo: "[
|
||||
Check if server and configuration has to be 'separate' ?
|
||||
currently yes, due to WGI_REQUEST.wgi_connector setting.
|
||||
But we may get rid of this one...
|
||||
See `{WGI_REQUEST}.wgi_connector' and `{WSF_REQUEST}.wgi_connector' ...
|
||||
]"
|
||||
description: "[
|
||||
Standalone Web Server connector
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -23,6 +18,7 @@ create
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Create current standalone connector.
|
||||
local
|
||||
fac: separate WGI_HTTPD_REQUEST_HANDLER_FACTORY [G]
|
||||
do
|
||||
@@ -40,6 +36,7 @@ feature {NONE} -- Initialization
|
||||
end
|
||||
|
||||
make_with_base (a_base: like base)
|
||||
-- Create current standalone connector with base url `a_base'
|
||||
require
|
||||
a_base_starts_with_slash: (a_base /= Void and then not a_base.is_empty) implies a_base.starts_with ("/")
|
||||
do
|
||||
@@ -47,13 +44,13 @@ feature {NONE} -- Initialization
|
||||
set_base (a_base)
|
||||
end
|
||||
|
||||
feature {NONE} -- Separate helper
|
||||
|
||||
initialize_server (a_server: like server)
|
||||
do
|
||||
a_server.set_observer (observer)
|
||||
end
|
||||
|
||||
feature {NONE} -- Separate helper
|
||||
|
||||
set_factory_connector (conn: detachable separate WGI_STANDALONE_CONNECTOR [G]; fac: separate WGI_HTTPD_REQUEST_HANDLER_FACTORY [G])
|
||||
do
|
||||
fac.set_connector (conn)
|
||||
@@ -75,12 +72,16 @@ feature -- Access
|
||||
feature -- Access
|
||||
|
||||
server: separate HTTPD_SERVER
|
||||
-- HTTPd server object.
|
||||
|
||||
controller: separate HTTPD_CONTROLLER
|
||||
-- Controller used to shutdown server.
|
||||
|
||||
observer: separate WGI_STANDALONE_SERVER_OBSERVER
|
||||
-- Observer providing information related to port number, and server status.
|
||||
|
||||
configuration: separate HTTPD_CONFIGURATION
|
||||
-- Server configuration.
|
||||
|
||||
feature -- Access
|
||||
|
||||
@@ -116,16 +117,18 @@ feature -- Event
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_base (b: like base)
|
||||
set_base (v: like base)
|
||||
-- Set base url `base' to `v'.
|
||||
require
|
||||
b_starts_with_slash: (b /= Void and then not b.is_empty) implies b.starts_with ("/")
|
||||
b_starts_with_slash: (v /= Void and then not v.is_empty) implies v.starts_with ("/")
|
||||
do
|
||||
base := b
|
||||
base := v
|
||||
ensure
|
||||
valid_base: (attached base as l_base and then not l_base.is_empty) implies l_base.starts_with ("/")
|
||||
end
|
||||
|
||||
set_port_number (a_port_number: INTEGER)
|
||||
-- Set port number to `a_port_number'.
|
||||
require
|
||||
a_port_number_positive_or_zero: a_port_number >= 0
|
||||
do
|
||||
@@ -133,6 +136,7 @@ feature -- Element change
|
||||
end
|
||||
|
||||
set_max_concurrent_connections (nb: INTEGER)
|
||||
-- Set maximum concurrent connections to `nb'.
|
||||
require
|
||||
nb_positive_or_zero: nb >= 0
|
||||
do
|
||||
@@ -140,31 +144,16 @@ feature -- Element change
|
||||
end
|
||||
|
||||
set_is_verbose (b: BOOLEAN)
|
||||
-- Set verbose mode.
|
||||
do
|
||||
set_is_verbose_on_configuration (b, configuration)
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
set_port_on_configuration (a_port_number: INTEGER; cfg: like configuration)
|
||||
do
|
||||
cfg.set_http_server_port (a_port_number)
|
||||
end
|
||||
|
||||
set_max_concurrent_connections_on_configuration (nb: INTEGER; cfg: like configuration)
|
||||
do
|
||||
cfg.set_max_concurrent_connections (nb)
|
||||
end
|
||||
|
||||
set_is_verbose_on_configuration (b: BOOLEAN; cfg: like configuration)
|
||||
do
|
||||
is_verbose := b
|
||||
cfg.set_is_verbose (b)
|
||||
end
|
||||
|
||||
feature -- Server
|
||||
|
||||
launch
|
||||
-- Launch web server listening.
|
||||
do
|
||||
launched := False
|
||||
port := 0
|
||||
@@ -173,6 +162,7 @@ feature -- Server
|
||||
end
|
||||
|
||||
shutdown_server
|
||||
-- Shutdown web server listening.
|
||||
do
|
||||
if launched then
|
||||
-- FIXME jfiat [2015/03/27] : prevent multiple calls (otherwise it hangs)
|
||||
@@ -180,20 +170,26 @@ feature -- Server
|
||||
end
|
||||
end
|
||||
|
||||
server_controller (a_server: like server): separate HTTPD_CONTROLLER
|
||||
do
|
||||
Result := a_server.controller
|
||||
end
|
||||
feature -- Events
|
||||
|
||||
on_server_started (obs: like observer)
|
||||
-- Server started and listeing on port `obs.port'.
|
||||
require
|
||||
obs.started
|
||||
obs.started -- SCOOP wait condition.
|
||||
do
|
||||
if obs.port > 0 then
|
||||
on_launched (obs.port)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
server_controller (a_server: like server): separate HTTPD_CONTROLLER
|
||||
do
|
||||
Result := a_server.controller
|
||||
end
|
||||
|
||||
configure_server (a_configuration: like configuration)
|
||||
do
|
||||
if a_configuration.is_verbose then
|
||||
@@ -209,8 +205,6 @@ feature -- Server
|
||||
a_server.launch
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation
|
||||
|
||||
separate_server_terminated (a_server: like server): BOOLEAN
|
||||
do
|
||||
Result := a_server.is_terminated
|
||||
@@ -221,6 +215,24 @@ feature {NONE} -- Implementation
|
||||
a_controller.shutdown
|
||||
end
|
||||
|
||||
feature {NONE} -- Implementation: element change
|
||||
|
||||
set_port_on_configuration (a_port_number: INTEGER; cfg: like configuration)
|
||||
do
|
||||
cfg.set_http_server_port (a_port_number)
|
||||
end
|
||||
|
||||
set_max_concurrent_connections_on_configuration (nb: INTEGER; cfg: like configuration)
|
||||
do
|
||||
cfg.set_max_concurrent_connections (nb)
|
||||
end
|
||||
|
||||
set_is_verbose_on_configuration (b: BOOLEAN; cfg: like configuration)
|
||||
do
|
||||
is_verbose := b
|
||||
cfg.set_is_verbose (b)
|
||||
end
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for WGI_STANDALONE_ERROR_STREAM."
|
||||
description: "[
|
||||
Error stream for the Standalone Web Server connector.
|
||||
]"
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WGI_STANDALONE_INPUT_STREAM}."
|
||||
description: "[
|
||||
Input stream for the Standalone Web Server connector.
|
||||
]"
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
note
|
||||
description: "Summary description for {WGI_STANDALONE_OUTPUT_STREAM}."
|
||||
description: "[
|
||||
Output stream for the Standalone Web Server connector
|
||||
]"
|
||||
legal: "See notice at end of class."
|
||||
status: "See notice at end of class."
|
||||
date: "$Date$"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
note
|
||||
description: "[
|
||||
WGI Response implemented using stream buffer
|
||||
|
||||
for the standalone Eiffel web server connector.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
note
|
||||
description: "Summary description for {WGI_STANDALONE_SERVER_OBSERVER}."
|
||||
author: ""
|
||||
description: "[
|
||||
Server status observer for the Standalone Web Server connector.
|
||||
This is used to get information related to the port number
|
||||
and the status of the server.
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
@@ -39,7 +42,6 @@ feature -- Event
|
||||
terminated := True
|
||||
end
|
||||
|
||||
|
||||
note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
|
||||
@@ -21,20 +21,4 @@
|
||||
<cluster name="implementation" location="$|implementation\" hidden="true"/>
|
||||
</cluster>
|
||||
</target>
|
||||
<target name="dev_scoop" extends="connector_standalone">
|
||||
<root class="HTTPD_CONNECTOR_DEV" feature="make"/>
|
||||
<option debug="true">
|
||||
<debug name="dbglog" enabled="true"/>
|
||||
<assertions precondition="true" postcondition="true" check="true" supplier_precondition="true"/>
|
||||
</option>
|
||||
<setting name="concurrency" value="scoop"/>
|
||||
<library name="wsf" location="..\..\..\wsf\wsf-safe.ecf" readonly="false"/>
|
||||
<cluster name="dev" location="dev\" recursive="true"/>
|
||||
</target>
|
||||
<target name="dev_mt" extends="dev_scoop">
|
||||
<setting name="concurrency" value="thread"/>
|
||||
</target>
|
||||
<target name="dev_none" extends="dev_scoop">
|
||||
<setting name="concurrency" value="none"/>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<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="test_connector_standalone" uuid="BA1C9760-8ECD-4182-8354-5D880F2FC81B" library_target="test_connector_standalone">
|
||||
<target name="test_standalone_scoop">
|
||||
<root class="TEST_STANDALONE_CONNECTOR" feature="make"/>
|
||||
<option debug="true" syntax="standard">
|
||||
<debug name="dbglog" enabled="true"/>
|
||||
<assertions precondition="true" postcondition="true" check="true" supplier_precondition="true"/>
|
||||
</option>
|
||||
<setting name="concurrency" value="scoop"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="connector_standalone" location="standalone-safe.ecf" readonly="false"/>
|
||||
<library name="ewsgi" location="..\..\ewsgi-safe.ecf" readonly="false"/>
|
||||
<library name="wsf" location="..\..\..\wsf\wsf-safe.ecf" readonly="false"/>
|
||||
<cluster name="tests" location="tests\" recursive="true"/>
|
||||
</target>
|
||||
<target name="test_standalone_thread" extends="test_standalone_scoop">
|
||||
<setting name="concurrency" value="thread"/>
|
||||
</target>
|
||||
<target name="test_standalone_none" extends="test_standalone_scoop">
|
||||
<setting name="concurrency" value="none"/>
|
||||
</target>
|
||||
<target name="test_connector_standalone" extends="test_standalone_scoop">
|
||||
</target>
|
||||
</system>
|
||||
@@ -1,11 +1,10 @@
|
||||
note
|
||||
description: "Summary description for {APP_COUNTER}."
|
||||
author: ""
|
||||
description: "Simple counter component."
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
APP_COUNTER
|
||||
TEST_COUNTER
|
||||
|
||||
create
|
||||
put
|
||||
@@ -1,11 +1,11 @@
|
||||
note
|
||||
description: "Summary description for {APP_WSF_EXECUTION}."
|
||||
description: "Summary description for {TEST_EXECUTION}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
APP_WSF_EXECUTION
|
||||
TEST_EXECUTION
|
||||
|
||||
inherit
|
||||
WSF_EXECUTION
|
||||
@@ -22,6 +22,7 @@ feature -- Execution
|
||||
s: STRING
|
||||
i64: INTEGER_64
|
||||
do
|
||||
i64 := {INTEGER_64} 1_000_000_000
|
||||
s := "Hello Concurrent EWF"
|
||||
s.append (" (counter=")
|
||||
s.append_integer (next_cell_counter_item (counter_cell))
|
||||
@@ -30,7 +31,7 @@ feature -- Execution
|
||||
if attached {WSF_STRING} request.query_parameter ("sleep") as p_sleep then
|
||||
if attached p_sleep.value.is_integer then
|
||||
s.append ("sleep for ")
|
||||
i64 := p_sleep.value.to_integer_64 * {INTEGER_64} 1_000_000_000
|
||||
i64 := p_sleep.value.to_integer_64 * ({INTEGER_64} 1_000_000_000)
|
||||
s.append_integer_64 (i64)
|
||||
execution_environment.sleep (i64)
|
||||
end
|
||||
@@ -49,7 +50,7 @@ feature -- Execution
|
||||
Result := cl.next_item
|
||||
end
|
||||
|
||||
counter_cell: separate APP_COUNTER
|
||||
counter_cell: separate TEST_COUNTER
|
||||
once ("PROCESS")
|
||||
create Result.put (0)
|
||||
end
|
||||
@@ -1,13 +1,13 @@
|
||||
note
|
||||
description: "[
|
||||
Objects that ...
|
||||
Testing+developping the standalone connector, no need to review.
|
||||
]"
|
||||
author: "$Author$"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
HTTPD_CONNECTOR_DEV
|
||||
TEST_STANDALONE_CONNECTOR
|
||||
|
||||
create
|
||||
make
|
||||
@@ -17,7 +17,7 @@ feature {NONE} -- Initialization
|
||||
make
|
||||
-- Initialize `Current'.
|
||||
local
|
||||
conn: WGI_STANDALONE_CONNECTOR [APP_WSF_EXECUTION]
|
||||
conn: WGI_STANDALONE_CONNECTOR [TEST_EXECUTION]
|
||||
do
|
||||
print ("Starting httpd server ...%N")
|
||||
|
||||
Reference in New Issue
Block a user