Updated various indexing notes.

Removed a few obsolete classes.
Cosmetics
This commit is contained in:
2015-03-31 21:33:38 +02:00
parent 9e1083eba8
commit 8246bc1444
92 changed files with 300 additions and 1066 deletions

View File

@@ -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

View File

@@ -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$"

View File

@@ -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.

View File

@@ -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$"

View File

@@ -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

View File

@@ -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$"

View File

@@ -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

View File

@@ -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$"

View File

@@ -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$"

View File

@@ -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

View File

@@ -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)

View File

@@ -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"

View File

@@ -1,6 +1,5 @@
note
description: "Summary description for {HTTPD_DEBUG_FACILITIES}."
author: ""
description: " Routines used for debug logging."
date: "$Date$"
revision: "$Revision$"

View File

@@ -1,6 +1,5 @@
note
description: "Summary description for {HTTPD_LOGGER}."
author: ""
description: "Logging facilities component"
date: "$Date$"
revision: "$Revision$"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +1,5 @@
note
description: "Summary description for {SSL_TCP_STREAM_SOCKET}."
author: ""
description: "SSL tcp stream socket."
date: "$Date$"
revision: "$Revision$"

View File

@@ -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"

View File

@@ -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$"

View File

@@ -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$"

View File

@@ -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$"

View File

@@ -1,7 +1,7 @@
note
description: "[
WGI Response implemented using stream buffer
for the standalone Eiffel web server connector.
]"
date: "$Date$"
revision: "$Revision$"

View File

@@ -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)"