Applied recent changes on WGI_ and WSF_

Moved classes away from ewsgi, restructured, cleaned
This commit is contained in:
Jocelyn Fiat
2011-10-21 16:56:23 +02:00
parent 79e12b8d04
commit 14a2c01f41
62 changed files with 163 additions and 1626 deletions

View File

@@ -0,0 +1,72 @@
note
description: "Summary description for {NINO_APPLICATION}."
date: "$Date$"
revision: "$Revision$"
class
NINO_APPLICATION
create
make,
make_custom
feature {NONE} -- Implementation
make (a_callback: like {WGI_AGENT_APPLICATION}.callback)
-- Initialize `Current'.
do
make_custom (a_callback, Void)
end
make_custom (a_callback: like {WGI_AGENT_APPLICATION}.callback; a_base_url: detachable STRING)
-- Initialize `Current'.
require
base_url_starts_with_slash: (a_base_url /= Void and then not a_base_url.is_empty) implies a_base_url.starts_with ("/")
local
app: WGI_AGENT_APPLICATION
do
create app.make (a_callback)
create connector.make_with_base (app, a_base_url)
end
connector: WGI_NINO_CONNECTOR
-- Web server connector
feature -- Status settings
configuration: HTTP_SERVER_CONFIGURATION
do
Result := connector.configuration
end
force_single_threaded
-- Force single threaded behavior
do
configuration.force_single_threaded := True
end
feature -- Server
listen (a_port: INTEGER)
do
configuration.http_server_port := a_port
connector.launch
end
shutdown
-- Shutdown the server
do
connector.server.shutdown_server
end
note
copyright: "2011-2011, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end

View File

@@ -1,11 +1,11 @@
note
description: "Summary description for {EWF_NINO_CONNECTOR}."
description: "Summary description for {WGI_NINO_CONNECTOR}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
EWF_NINO_CONNECTOR
WGI_NINO_CONNECTOR
inherit
WGI_CONNECTOR
@@ -68,7 +68,7 @@ feature -- Server
local
l_http_handler : HTTP_HANDLER
do
create {EWF_NINO_HANDLER} l_http_handler.make_with_callback (server, "NINO_HANDLER", Current)
create {WGI_NINO_HANDLER} l_http_handler.make_with_callback (server, "NINO_HANDLER", Current)
debug ("nino")
if attached base as l_base then
print ("Base=" + l_base + "%N")
@@ -84,8 +84,8 @@ feature -- Server
rescued: BOOLEAN
do
if not rescued then
create req.make (env, create {EWF_NINO_INPUT_STREAM}.make (a_input))
create res.make (create {EWF_NINO_OUTPUT_STREAM}.make (a_output))
create req.make (env, create {WGI_NINO_INPUT_STREAM}.make (a_input))
create res.make (create {WGI_NINO_OUTPUT_STREAM}.make (a_output))
req.set_meta_string_variable ("RAW_HEADER_DATA", a_headers_text)
application.execute (req, res)
else

View File

@@ -5,7 +5,7 @@ note
revision : "$Revision$"
class
EWF_NINO_HANDLER
WGI_NINO_HANDLER
inherit
HTTP_CONNECTION_HANDLER
@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
callback := a_callback
end
callback: EWF_NINO_CONNECTOR
callback: WGI_NINO_CONNECTOR
feature -- Access

View File

@@ -1,12 +1,12 @@
note
description: "Summary description for {EWF_NINO_INPUT_STREAM}."
description: "Summary description for {WGI_NINO_INPUT_STREAM}."
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
EWF_NINO_INPUT_STREAM
WGI_NINO_INPUT_STREAM
inherit
WGI_INPUT_STREAM
@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
set_nino_input (a_nino_input)
end
feature {EWF_NINO_CONNECTOR, WGI_APPLICATION} -- Nino
feature {WGI_NINO_CONNECTOR, WGI_APPLICATION} -- Nino
set_nino_input (i: like nino_input)
do

View File

@@ -1,12 +1,12 @@
note
description: "Summary description for {EWF_NINO_OUTPUT_STREAM}."
description: "Summary description for {WGI_NINO_OUTPUT_STREAM}."
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class
EWF_NINO_OUTPUT_STREAM
WGI_NINO_OUTPUT_STREAM
inherit
WGI_OUTPUT_STREAM
@@ -26,7 +26,7 @@ feature {NONE} -- Initialization
set_nino_output (a_nino_output)
end
feature {EWF_NINO_CONNECTOR, WGI_APPLICATION} -- Nino
feature {WGI_NINO_CONNECTOR, WGI_APPLICATION} -- Nino
set_nino_output (o: like nino_output)
do