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:
@@ -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
|
||||
|
||||
|
||||
##
|
||||
|
||||
@@ -22,8 +22,8 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature {NONE} -- Access
|
||||
|
||||
application: WGI_APPLICATION
|
||||
-- Gateway Application
|
||||
application: WGI_SERVICE
|
||||
-- Gateway Service
|
||||
|
||||
feature -- Server
|
||||
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -7,7 +7,7 @@ note
|
||||
deferred class
|
||||
WGI_RESPONSE_BUFFER
|
||||
|
||||
feature {WGI_APPLICATION} -- Commit
|
||||
feature {WGI_SERVICE} -- Commit
|
||||
|
||||
commit
|
||||
-- Commit the current response
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,7 +23,7 @@ feature {NONE} -- Initialization
|
||||
output := a_output
|
||||
end
|
||||
|
||||
feature {WGI_APPLICATION} -- Commit
|
||||
feature {WGI_SERVICE} -- Commit
|
||||
|
||||
commit
|
||||
-- Commit the current response
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user