Implemented WSF_RESPONSE.put_error (...) and related

Added WSF_RESPONSE.put_character
Renamed  WGI_OUTPUT_STREAM.put_character_8 as put_character  to follow style of put_string  (and not put_string_8)
Refactored the WSF_DEFAULT_SERVICE_LAUNCHER
Added WSF_DEFAULT_SERVICE to be more user friendly
Splitted the wsf/default/ libraries to have wsf/connector/... and being able to handle more than one connector in the same application
This commit is contained in:
Jocelyn Fiat
2012-03-20 10:29:55 +01:00
parent 71d5dc4795
commit 8344607eb6
63 changed files with 1238 additions and 407 deletions

View File

@@ -8,17 +8,33 @@ class
create
make,
make_custom
make_custom,
make_with_callback,
make_custom_with_callback
feature {NONE} -- Implementation
make (a_callback: like {WGI_AGENT_SERVICE}.callback)
make (a_service: WGI_SERVICE)
-- Initialize `Current'.
do
make_custom (a_callback, Void)
make_custom (a_service, Void)
end
make_custom (a_callback: like {WGI_AGENT_SERVICE}.callback; a_base_url: detachable STRING)
make_custom (a_service: WGI_SERVICE; 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 ("/")
do
create connector.make_with_base (a_service, a_base_url)
end
make_with_callback (a_callback: like {WGI_AGENT_SERVICE}.callback)
-- Initialize `Current'.
do
make_custom_with_callback (a_callback, Void)
end
make_custom_with_callback (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 ("/")
@@ -26,7 +42,7 @@ feature {NONE} -- Implementation
app: WGI_AGENT_SERVICE
do
create app.make (a_callback)
create connector.make_with_base (app, a_base_url)
make_custom (app, a_base_url)
end
feature -- Access
@@ -88,7 +104,7 @@ feature -- Server
end
note
copyright: "2011-2011, Eiffel Software and others"
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software

View File

@@ -119,7 +119,7 @@ feature -- Server
res: detachable WGI_NINO_RESPONSE_STREAM
do
create req.make (env, create {WGI_NINO_INPUT_STREAM}.make (a_socket), Current)
create res.make (create {WGI_NINO_OUTPUT_STREAM}.make (a_socket))
create res.make (create {WGI_NINO_OUTPUT_STREAM}.make (a_socket), Void)
req.set_meta_string_variable ("RAW_HEADER_DATA", a_headers_text)
service.execute (req, res)
res.commit

View File

@@ -10,9 +10,6 @@ class
inherit
WGI_OUTPUT_STREAM
redefine
put_character_8
end
HTTP_STATUS_CODE_MESSAGES
export
@@ -66,7 +63,7 @@ feature -- Output
target.put_readable_string_8 (s)
end
put_character_8 (c: CHARACTER_8)
put_character (c: CHARACTER_8)
do
target.put_character (c)
end
@@ -86,7 +83,7 @@ feature -- Basic operations
end
note
copyright: "2011-2011, Eiffel Software and others"
copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software