Removed any (put|write)_file_content from the WSF_ or WGI_ OUTPUT classes

Now DEFAULT_SERVICE has to be created instead of inherited.
   - This seems to be better for new user, and this avoid potential conflict and difference when inheriting between the various DEFAULT_SERVICE implementation.
   - remember that DEFAULT_SERVICE, is mainly to help the user to build its very first service.
Use READABLE_STRING_8 as argument whenever it is possible.
Added WSF_RESPONSE_MESSAGE, and WSF_RESPONSE.put_response (a_response_message)
Now WSF_RESPONSE inherit from WGI_RESPONSE
This commit is contained in:
Jocelyn Fiat
2011-12-12 11:16:15 +01:00
parent 019fb539ae
commit 89572b4f33
19 changed files with 426 additions and 128 deletions

View File

@@ -1,24 +1,28 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-9-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-9-0 http://www.eiffel.com/developers/xml/configuration-1-9-0.xsd" name="hello_routed_world" uuid="7C9887BD-4AE4-47F2-A0AA-4BBB6736D433">
<target name="hello_connector">
<target name="hello_connector" abstract="true">
<root class="HELLO_ROUTED_WORLD" feature="make"/>
<file_rule>
<exclude>/EIFGENs$</exclude>
<exclude>/\.git$</exclude>
<exclude>/\.svn$</exclude>
</file_rule>
<option warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
<debug name="nino" enabled="true"/>
<assertions precondition="true" postcondition="true" check="true" invariant="true" supplier_precondition="true"/>
</option>
<setting name="concurrency" value="thread"/>
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf" readonly="false"/>
<library name="http" location="..\..\library\protocol\http\http-safe.ecf" readonly="false"/>
<library name="router" location="..\..\library\server\request\router\router-safe.ecf" readonly="false"/>
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf" readonly="false"/>
</target>
<target name="hello_nino" extends="hello_connector">
<library name="default_nino" location="..\..\library\server\wsf\default\nino-safe.ecf"/>
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
<debug name="nino" enabled="true"/>
<assertions precondition="true" postcondition="true" check="true" invariant="true" supplier_precondition="true"/>
</option>
<library name="default_nino" location="..\..\library\server\wsf\default\nino-safe.ecf" use_application_options="true"/>
<cluster name="src" location="src\" recursive="true"/>
</target>
<target name="hello_cgi" extends="hello_connector">

View File

@@ -8,24 +8,21 @@ class
HELLO_ROUTED_WORLD
inherit
ANY
URI_TEMPLATE_ROUTED_SERVICE
ROUTED_SERVICE_HELPER
DEFAULT_SERVICE
create
make
feature {NONE} -- Initialization
make
local
s: DEFAULT_SERVICE
do
initialize_router
make_and_launch
create s.make_and_launch (agent execute)
end
create_router
@@ -90,7 +87,11 @@ feature -- Execution
n: INTEGER
i: INTEGER
s: STRING_8
df: WSF_FILE_RESPONSE
do
create df.make_html ("index.html")
df.set_no_cache
l_url := req.script_url ("/home")
n := 3
@@ -199,7 +200,7 @@ feature -- Execution
handle_hello (ctx: REQUEST_URI_TEMPLATE_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)
do
execute_hello (req, res, Void, ctx)
execute_hello (req, res, ctx.string_parameter ("name"), ctx)
end
handle_anonymous_hello (ctx: REQUEST_URI_TEMPLATE_HANDLER_CONTEXT; req: WSF_REQUEST; res: WSF_RESPONSE)

View File

@@ -14,17 +14,17 @@ inherit
ROUTED_SERVICE_HELPER
DEFAULT_SERVICE
create
make
feature {NONE} -- Initialization
make
local
s: DEFAULT_SERVICE
do
initialize_router
make_and_launch
create s.make_and_launch (agent execute)
end
create_router