Renamed "ext" folder as "contrib" folder and reorganized a little bit

Renamed any *_APPLICATION as *_SERVICE
   mainly because those components
   such as WSF_APPLICATION, renamed as WSF_SERVICE
   are not always the main application entry, and "service" describe them better
Minor implementation change in WSF_REQUEST
Cosmetics
This commit is contained in:
Jocelyn Fiat
2011-11-17 15:50:30 +01:00
parent cc11debf08
commit 49c3e8e789
52 changed files with 134 additions and 144 deletions

12
.gitmodules vendored
View File

@@ -1,12 +1,12 @@
[submodule "doc/wiki"]
path = doc/wiki
url = https://github.com/Eiffel-World/Eiffel-Web-Framework.wiki.git
[submodule "ext/server/nino"]
path = ext/server/nino
[submodule "contrib/library/server/nino"]
path = contrib/library/server/nino
url = http://github.com/Eiffel-World/EiffelWebNino.git
[submodule "ext/text/json"]
path = ext/text/json
[submodule "contrib/library/text/parser/json"]
path = contrib/library/text/parser/json
url = http://github.com/Eiffel-World/ejson-svn.git
[submodule "ext/ise_library/curl"]
path = ext/ise_library/curl
[submodule "contrib/ise_library/cURL"]
path = contrib/ise_library/cURL
url = http://github.com/EiffelSoftware/mirror-Eiffel-cURL.git

View File

@@ -10,11 +10,11 @@ class
inherit
ANY
URI_TEMPLATE_ROUTED_APPLICATION
URI_TEMPLATE_ROUTED_SERVICE
ROUTED_APPLICATION_HELPER
ROUTED_SERVICE_HELPER
DEFAULT_APPLICATION
DEFAULT_SERVICE
create
make

View File

@@ -12,7 +12,7 @@
<setting name="concurrency" value="thread"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="http_client" location="..\..\..\library\client\http_client\http_client-safe.ecf" readonly="false"/>
<library name="json" location="..\..\..\ext\text\json\library\json-safe.ecf" readonly="false"/>
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
<library name="thread" location="$ISE_LIBRARY\library\thread\thread-safe.ecf"/>
<cluster name="src" location=".\src\" recursive="true"/>
</target>

View File

@@ -11,7 +11,7 @@
</option>
<setting name="concurrency" value="thread"/>
<library name="http_client" location="..\..\..\library\client\http_client\http_client.ecf"/>
<library name="json" location="..\..\..\ext\text\json\library\json.ecf" readonly="false"/>
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json.ecf" readonly="false"/>
<library name="base" location="$ISE_LIBRARY/library/base/base.ecf"/>
<library name="thread" location="$ISE_LIBRARY/library/thread/thread.ecf"/>
<cluster name="src" location="./src" recursive="true"/>

View File

@@ -18,7 +18,7 @@
<library name="eel" location="..\..\library\crypto\eel\eel-safe.ecf" readonly="false"/>
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
<library name="http" location="..\..\library\protocol\http\http-safe.ecf" readonly="false"/>
<library name="json" location="..\..\ext\text\json\library\json-safe.ecf" readonly="false"/>
<library name="json" location="..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
<library name="router" location="..\..\library\server\request\router\router-safe.ecf" readonly="false"/>
<library name="uri_template" location="..\..\library\protocol\uri_template\uri_template-safe.ecf" readonly="false"/>
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf" readonly="false"/>

View File

@@ -10,11 +10,11 @@ class
inherit
ANY
URI_TEMPLATE_ROUTED_APPLICATION
URI_TEMPLATE_ROUTED_SERVICE
ROUTED_APPLICATION_HELPER
ROUTED_SERVICE_HELPER
DEFAULT_APPLICATION
DEFAULT_SERVICE
create
make

View File

@@ -1,6 +1,5 @@
note
description: "Summary description for {ETAG_UTILS}."
author: ""
date: "$Date$"
revision: "$Revision$"
@@ -8,25 +7,24 @@ class
ETAG_UTILS
inherit
ARRAY_FACILITIES
feature
feature -- Access
md5_digest (a_string: STRING): STRING
-- Cryptographic hash function that produces a 128-bit (16-byte) hash value, based on `a_string'
local
md5: MD5
output: SPECIAL [NATURAL_8]
do
create md5.make
create output.make_filled (0, 16)
md5.sink_string (a_string)
md5.do_final (output, 0)
Result := as_natural_32_be (output, 0).to_hex_string
Result := Result + as_natural_32_be (output, 4).to_hex_string
Result := Result + as_natural_32_be (output, 8).to_hex_string
Result := Result + as_natural_32_be (output, 12).to_hex_string
Result.append (as_natural_32_be (output, 4).to_hex_string)
Result.append (as_natural_32_be (output, 8).to_hex_string)
Result.append (as_natural_32_be (output, 12).to_hex_string)
end
note

View File

@@ -15,7 +15,7 @@
<version type="compiler" min="7.0.8.7340"/>
</condition>
</library>
<library name="curl_local" location="..\..\..\ext\ise_library\cURL-safe.ecf">
<library name="curl_local" location="..\..\..\contrib\ise_library\cURL-safe.ecf">
<condition>
<version type="compiler" max="7.0.8.7339"/>
</condition>

View File

@@ -15,7 +15,7 @@
<version type="compiler" min="7.0.8.7340"/>
</condition>
</library>
<library name="curl_local" location="..\..\..\ext\ise_library\cURL.ecf">
<library name="curl_local" location="..\..\..\contrib\ise_library\cURL.ecf">
<condition>
<version type="compiler" max="7.0.8.7339"/>
</condition>

View File

@@ -1,7 +1,12 @@
# Eiffel Web Server Gateway Interface
## Overview
The main goal of this library is to provide a common layer on top of many different connectors.
A connector is a library used for the integration of Eiffel web server application with an underlying httpd server technology such as CGI, libFCGI, or even standalone Eiffel Web Nino (which is a httpd server written in Eiffel).
Then one can build an Eiffel web service compliant with EWSGI specification, and thus with the same code (or almost), this could be compiled to run on any available connectors.
## Usage
##

View File

@@ -22,8 +22,8 @@ feature {NONE} -- Initialization
feature {NONE} -- Access
application: WGI_APPLICATION
-- Gateway Application
application: WGI_SERVICE
-- Gateway Service
feature -- Server

View File

@@ -13,7 +13,7 @@
<library name="connector" location="..\connector-safe.ecf" readonly="false"/>
<library name="ewsgi" location="..\..\ewsgi-safe.ecf" readonly="false"/>
<library name="http" location="..\..\..\..\protocol\http\http-safe.ecf"/>
<library name="nino" location="..\..\..\..\..\ext\server\nino\nino-safe.ecf" readonly="false">
<library name="nino" location="..\..\..\..\..\contrib\library\server\nino\nino-safe.ecf" readonly="false">
<renaming old_name="HTTP_CONSTANTS" new_name="NINO_HTTP_CONSTANTS"/>
</library>
<cluster name="src" location=".\src\" recursive="true"/>

View File

@@ -13,7 +13,7 @@
<library name="connector" location="..\connector.ecf" readonly="false"/>
<library name="ewsgi" location="..\..\ewsgi.ecf" readonly="false"/>
<library name="http" location="..\..\..\..\protocol\http\http.ecf"/>
<library name="nino" location="..\..\..\..\..\ext\server\nino\nino.ecf" readonly="false">
<library name="nino" location="..\..\..\..\..\contrib\library\server\nino\nino.ecf" readonly="false">
<renaming old_name="HTTP_CONSTANTS" new_name="NINO_HTTP_CONSTANTS"/>
</library>
<cluster name="src" location=".\src\" recursive="true"/>

View File

@@ -1,10 +1,10 @@
note
description: "Summary description for {NINO_APPLICATION}."
description: "Summary description for {NINO_SERVICE}."
date: "$Date$"
revision: "$Revision$"
class
NINO_APPLICATION
NINO_SERVICE
create
make,
@@ -12,18 +12,18 @@ create
feature {NONE} -- Implementation
make (a_callback: like {WGI_AGENT_APPLICATION}.callback)
make (a_callback: like {WGI_AGENT_SERVICE}.callback)
-- Initialize `Current'.
do
make_custom (a_callback, Void)
end
make_custom (a_callback: like {WGI_AGENT_APPLICATION}.callback; a_base_url: detachable STRING)
make_custom (a_callback: like {WGI_AGENT_SERVICE}.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
app: WGI_AGENT_SERVICE
do
create app.make (a_callback)
create connector.make_with_base (app, a_base_url)

View File

@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
set_source (a_source)
end
feature {WGI_NINO_CONNECTOR, WGI_APPLICATION} -- Nino
feature {WGI_NINO_CONNECTOR, WGI_SERVICE} -- Nino
set_source (i: like source)
do

View File

@@ -29,7 +29,7 @@ feature {NONE} -- Initialization
set_target (a_target)
end
feature {WGI_NINO_CONNECTOR, WGI_APPLICATION} -- Nino
feature {WGI_NINO_CONNECTOR, WGI_SERVICE} -- Nino
set_target (o: like target)
do

View File

@@ -15,7 +15,7 @@ feature {NONE} -- Initialization
make
do
print ("Example: start a Nino web server on port " + port_number.out + ", %Nand reply Hello World for any request such as http://localhost:8123/%N")
(create {NINO_APPLICATION}.make_custom (agent execute, "")).listen (port_number)
(create {NINO_SERVICE}.make_custom (agent execute, "")).listen (port_number)
end
execute (req: WGI_REQUEST; res: WGI_RESPONSE_BUFFER)

View File

@@ -7,7 +7,7 @@ note
deferred class
WGI_RESPONSE_BUFFER
feature {WGI_APPLICATION} -- Commit
feature {WGI_SERVICE} -- Commit
commit
-- Commit the current response

View File

@@ -1,12 +1,12 @@
note
description: "Summary description for {WGI_APPLICATION}."
description: "Summary description for {WGI_SERVICE}."
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
deferred class
WGI_APPLICATION
WGI_SERVICE
feature {NONE} -- Execution

View File

@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
output := a_output
end
feature {WGI_APPLICATION} -- Commit
feature {WGI_SERVICE} -- Commit
commit
-- Commit the current response

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {WGI_AGENT_APPLICATION}."
description: "Summary description for {WGI_AGENT_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
WGI_AGENT_APPLICATION
WGI_AGENT_SERVICE
inherit
WGI_APPLICATION
WGI_SERVICE
create
make

View File

@@ -1,6 +1,6 @@
note
description: "[
WGI_APPLICATION
WGI_SERVICE
]"
specification: "EWSGI specification https://github.com/Eiffel-World/Eiffel-Web-Framework/wiki/EWSGI-specification"
legal: "See notice at end of class."
@@ -9,7 +9,7 @@ note
revision: "$Revision$"
deferred class
WGI_APPLICATION
WGI_SERVICE
feature -- Execution

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {DEFAULT_REST_APPLICATION}."
description: "Summary description for {DEFAULT_REST_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
REST_APPLICATION
REST_SERVICE
inherit
REST_APPLICATION_I [REST_REQUEST_HANDLER [REST_REQUEST_HANDLER_CONTEXT], REST_REQUEST_HANDLER_CONTEXT]
REST_SERVICE_I [REST_REQUEST_HANDLER [REST_REQUEST_HANDLER_CONTEXT], REST_REQUEST_HANDLER_CONTEXT]
note
copyright: "Copyright (c) 1984-2011, Eiffel Software and others"

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {REST_APPLICATION}."
description: "Summary description for {REST_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
REST_APPLICATION_I [H -> REST_REQUEST_HANDLER [C], C -> REST_REQUEST_HANDLER_CONTEXT]
REST_SERVICE_I [H -> REST_REQUEST_HANDLER [C], C -> REST_REQUEST_HANDLER_CONTEXT]
inherit
ROUTED_APPLICATION_I [H, C]
ROUTED_SERVICE_I [H, C]
redefine
router
end

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {DEFAULT_REST_URI_APPLICATION}."
description: "Summary description for {DEFAULT_REST_URI_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
REST_URI_APPLICATION
REST_URI_SERVICE
inherit
REST_APPLICATION_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT], REST_REQUEST_URI_HANDLER_CONTEXT]
REST_SERVICE_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_HANDLER_CONTEXT], REST_REQUEST_URI_HANDLER_CONTEXT]
redefine
router
end

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {DEFAULT_URI_TEMPLATE_REST_APPLICATION}."
description: "Summary description for {DEFAULT_URI_TEMPLATE_REST_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
REST_URI_TEMPLATE_APPLICATION
REST_URI_TEMPLATE_SERVICE
inherit
REST_APPLICATION_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_TEMPLATE_HANDLER_CONTEXT], REST_REQUEST_URI_TEMPLATE_HANDLER_CONTEXT]
REST_SERVICE_I [REST_REQUEST_HANDLER [REST_REQUEST_URI_TEMPLATE_HANDLER_CONTEXT], REST_REQUEST_URI_TEMPLATE_HANDLER_CONTEXT]
redefine
router
end

View File

@@ -8,12 +8,12 @@ class
APP_SERVER
inherit
APP_APPLICATION
APP_SERVICE
redefine
execute
end
REST_APPLICATION_GATEWAY
REST_SERVICE_GATEWAY
create
make

View File

@@ -1,8 +1,8 @@
deferred class
REST_APPLICATION_GATEWAY
REST_SERVICE_GATEWAY
inherit
WSF_APPLICATION
WSF_SERVICE
feature -- Access

View File

@@ -1,8 +1,8 @@
deferred class
REST_APPLICATION_GATEWAY
REST_SERVICE_GATEWAY
inherit
WSF_APPLICATION
WSF_SERVICE
feature -- Access

View File

@@ -1,14 +1,14 @@
deferred class
REST_APPLICATION_GATEWAY
REST_SERVICE_GATEWAY
inherit
WSF_APPLICATION
WSF_SERVICE
feature -- Access
build_gateway_and_launch
local
app: NINO_APPLICATION
app: NINO_SERVICE
port_number: INTEGER
base_url: STRING
do

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {APP_APPLICATION}."
description: "Summary description for {APP_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
APP_APPLICATION
APP_SERVICE
inherit
REST_APPLICATION_I [APP_REQUEST_HANDLER, APP_REQUEST_HANDLER_CONTEXT]
REST_SERVICE_I [APP_REQUEST_HANDLER, APP_REQUEST_HANDLER_CONTEXT]
redefine
router
end

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {DEFAULT_ROUTED_APPLICATION}."
description: "Summary description for {DEFAULT_ROUTED_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
ROUTED_APPLICATION
ROUTED_SERVICE
inherit
ROUTED_APPLICATION_I [REQUEST_HANDLER [REQUEST_HANDLER_CONTEXT], REQUEST_HANDLER_CONTEXT]
ROUTED_SERVICE_I [REQUEST_HANDLER [REQUEST_HANDLER_CONTEXT], REQUEST_HANDLER_CONTEXT]
note
copyright: "2011-2011, Eiffel Software and others"

View File

@@ -1,11 +1,11 @@
note
description: "Summary description for {ROUTED_APPLICATION_HELPER}."
description: "Summary description for {ROUTED_SERVICE_HELPER}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
ROUTED_APPLICATION_HELPER
ROUTED_SERVICE_HELPER
inherit
ANY

View File

@@ -10,7 +10,7 @@ deferred class
inherit
ANY
ROUTED_APPLICATION_HELPER
ROUTED_SERVICE_HELPER
export
{NONE} all
end

View File

@@ -1,11 +1,11 @@
note
description: "Summary description for {ROUTED_APPLICATION}."
description: "Summary description for {ROUTED_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
ROUTED_APPLICATION_I [H -> REQUEST_HANDLER [C], C -> REQUEST_HANDLER_CONTEXT]
ROUTED_SERVICE_I [H -> REQUEST_HANDLER [C], C -> REQUEST_HANDLER_CONTEXT]
feature -- Setup

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {DEFAULT_URI_ROUTED_APPLICATION}."
description: "Summary description for {DEFAULT_URI_ROUTED_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
URI_ROUTED_APPLICATION
URI_ROUTED_SERVICE
inherit
ROUTED_APPLICATION_I [REQUEST_HANDLER [REQUEST_URI_HANDLER_CONTEXT], REQUEST_URI_HANDLER_CONTEXT]
ROUTED_SERVICE_I [REQUEST_HANDLER [REQUEST_URI_HANDLER_CONTEXT], REQUEST_URI_HANDLER_CONTEXT]
redefine
router
end

View File

@@ -1,14 +1,14 @@
note
description: "Summary description for {DEFAULT_URI_TEMPLATE_ROUTED_APPLICATION}."
description: "Summary description for {DEFAULT_URI_TEMPLATE_ROUTED_SERVICE}."
author: ""
date: "$Date$"
revision: "$Revision$"
deferred class
URI_TEMPLATE_ROUTED_APPLICATION
URI_TEMPLATE_ROUTED_SERVICE
inherit
ROUTED_APPLICATION_I [REQUEST_HANDLER [REQUEST_URI_TEMPLATE_HANDLER_CONTEXT], REQUEST_URI_TEMPLATE_HANDLER_CONTEXT]
ROUTED_SERVICE_I [REQUEST_HANDLER [REQUEST_URI_TEMPLATE_HANDLER_CONTEXT], REQUEST_URI_TEMPLATE_HANDLER_CONTEXT]
redefine
router
end

View File

@@ -1,13 +1,13 @@
note
description: "Summary description for {DEFAULT_APPLICATION}."
description: "Summary description for {DEFAULT_SERVICE}."
date: "$Date$"
revision: "$Revision$"
deferred class
DEFAULT_APPLICATION
DEFAULT_SERVICE
inherit
WSF_APPLICATION
WSF_SERVICE
feature {NONE} -- Initialization

View File

@@ -1,13 +1,13 @@
note
description: "Summary description for {DEFAULT_APPLICATION}."
description: "Summary description for {DEFAULT_SERVICE}."
date: "$Date$"
revision: "$Revision$"
deferred class
DEFAULT_APPLICATION
DEFAULT_SERVICE
inherit
WSF_APPLICATION
WSF_SERVICE
feature {NONE} -- Initialization

View File

@@ -14,7 +14,7 @@
<library name="ewsgi" location="../../ewsgi/ewsgi-safe.ecf"/>
<library name="wsf" location="../wsf-safe.ecf"/>
<library name="connector_nino" location="../../ewsgi/connectors/nino/nino-safe.ecf"/>
<library name="nino" location="..\..\..\..\ext\server\nino\nino-safe.ecf" readonly="false">
<library name="nino" location="..\..\..\..\contrib\library\server\nino\nino-safe.ecf" readonly="false">
<renaming old_name="HTTP_CONSTANTS" new_name="NINO_HTTP_CONSTANTS"/>
</library>

View File

@@ -14,7 +14,7 @@
<library name="ewsgi" location="../../ewsgi/ewsgi.ecf"/>
<library name="wsf" location="../wsf.ecf"/>
<library name="connector_nino" location="../../ewsgi/connectors/nino/nino.ecf"/>
<library name="nino" location="..\..\..\..\ext\server\nino\nino.ecf" readonly="false">
<library name="nino" location="..\..\..\..\contrib\library\server\nino\nino.ecf" readonly="false">
<renaming old_name="HTTP_CONSTANTS" new_name="NINO_HTTP_CONSTANTS"/>
</library>

View File

@@ -1,19 +1,19 @@
note
description: "Summary description for {DEFAULT_APPLICATION}."
description: "Summary description for {DEFAULT_SERVICE}."
date: "$Date$"
revision: "$Revision$"
deferred class
DEFAULT_APPLICATION
DEFAULT_SERVICE
inherit
WSF_APPLICATION
WSF_SERVICE
feature {NONE} -- Initialization
make_and_launch
local
app: NINO_APPLICATION
app: NINO_SERVICE
do
port_number := 8080
base_url := ""

View File

@@ -5,7 +5,7 @@ note
It includes CGI interface and a few extra values that are usually valuable
In addition it provides
query_parameter(s)
form_data_parameter(s)
form_parameter(s)
...
]"
date: "$Date$"
@@ -17,7 +17,7 @@ class
inherit
DEBUG_OUTPUT
create {WSF_APPLICATION}
create {WSF_SERVICE}
make_from_wgi
convert
@@ -1001,7 +1001,7 @@ feature {NONE} -- Form fields and related
-- Variables sent by POST request
local
vars: like internal_form_data_parameters_table
s: STRING
s: READABLE_STRING_8
n: NATURAL_64
l_type: like content_type
do
@@ -1017,10 +1017,10 @@ feature {NONE} -- Form fields and related
create vars.make (5)
vars.compare_objects
--| FIXME: optimization ... fetch the input data progressively, otherwise we might run out of memory ...
s := form_input_data (n.to_integer_32) --| FIXME truncated from NAT64 to INT32
s := form_input_data (n)
analyze_multipart_form (l_type, s, vars)
else
s := form_input_data (n.to_integer_32) --| FIXME truncated from NAT64 to INT32
s := form_input_data (n)
vars := urlencoded_parameters (s)
end
if raw_post_data_recorded then
@@ -1480,15 +1480,19 @@ feature {NONE} -- Internal value
default_content_type: STRING = "text/plain"
-- Default content type
form_input_data (nb: INTEGER): STRING
form_input_data (nb: NATURAL_64): READABLE_STRING_8
-- data from input form
local
nb32: INTEGER
n: INTEGER
t: STRING
s: STRING_8
do
from
n := nb
create Result.make (n)
nb32 := nb.to_integer_32
n := nb32
create s.make (n)
Result := s
if n > 1_024 then
n := 1_024
end
@@ -1497,11 +1501,11 @@ feature {NONE} -- Internal value
loop
input.read_string (n)
t := input.last_string
Result.append_string (t)
s.append_string (t)
if t.count < n then
n := 0
end
n := nb - t.count
n := nb32 - t.count
end
end

View File

@@ -1,6 +1,6 @@
note
description: "[
Summary description for {WSF_RESPONSE}.
Main interface to send message back to the client
]"
date: "$Date$"
revision: "$Revision$"
@@ -8,7 +8,7 @@ note
class
WSF_RESPONSE
create {WSF_APPLICATION}
create {WSF_SERVICE}
make_from_wgi
convert
@@ -23,18 +23,6 @@ feature {NONE} -- Initialization
wgi_response: WGI_RESPONSE_BUFFER
--feature {WSF_APPLICATION} -- Commit
-- commit
-- -- Commit the current response
-- do
-- wgi_response.commit
-- ensure
-- status_is_set: status_is_set
-- header_committed: header_committed
-- message_committed: message_committed
-- end
feature -- Status report
header_committed: BOOLEAN
@@ -55,15 +43,6 @@ feature -- Status report
Result := wgi_response.message_writable
end
--feature {WGI_RESPONSE_BUFFER} -- Core output operation
-- write (s: READABLE_STRING_8)
-- -- Send the string `s'
-- -- this can be used for header and body
-- do
-- wgi_response.write (s)
-- end
feature -- Status setting
status_is_set: BOOLEAN

View File

@@ -1,13 +1,17 @@
note
description: "Objects that ..."
description: "[
Inherit from this class to implement the main entry of your web service
You just need to implement `execute', get data from the request `req'
and write the response in `res'
]"
date: "$Date$"
revision: "$Revision$"
deferred class
WSF_APPLICATION
WSF_SERVICE
inherit
WGI_APPLICATION
WGI_SERVICE
rename
execute as wgi_execute
end

View File

@@ -17,14 +17,14 @@ inherit
on_clean
end
WSF_APPLICATION
WSF_SERVICE
undefine
default_create
end
feature {NONE} -- Events
web_app: detachable NINO_APPLICATION
web_app: detachable NINO_SERVICE
port_number: INTEGER
base_url: detachable STRING
@@ -32,7 +32,7 @@ feature {NONE} -- Events
on_prepare
-- <Precursor>
local
app: NINO_APPLICATION
app: NINO_SERVICE
wt: WORKER_THREAD
e: EXECUTION_ENVIRONMENT
do