renamed GW_REQUEST_CONTEXT as GW_REQUEST
This commit is contained in:
@@ -15,7 +15,7 @@ feature {NONE} -- Initialization
|
|||||||
make
|
make
|
||||||
do
|
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")
|
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 {GW_NINO_APPLICATION}.make (agent (req: GW_REQUEST_CONTEXT; res: GW_RESPONSE)
|
(create {GW_NINO_APPLICATION}.make (agent (req: GW_REQUEST; res: GW_RESPONSE)
|
||||||
do
|
do
|
||||||
res.output.put_header (200, <<["Content-Type", "text/plain"]>>)
|
res.output.put_header (200, <<["Content-Type", "text/plain"]>>)
|
||||||
res.output.put_string ("Hello World!%N")
|
res.output.put_string ("Hello World!%N")
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ feature -- Extra
|
|||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT} -- Element change
|
feature {GW_REQUEST} -- Element change
|
||||||
|
|
||||||
set_orig_path_info (s: STRING)
|
set_orig_path_info (s: STRING)
|
||||||
-- Set ORIG_PATH_INFO to `s'
|
-- Set ORIG_PATH_INFO to `s'
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ feature -- Access
|
|||||||
Result := table.has_key (a_name)
|
Result := table.has_key (a_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
feature {GW_REQUEST, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
||||||
|
|
||||||
set_variable (a_name: STRING; a_value: STRING)
|
set_variable (a_name: STRING; a_value: STRING)
|
||||||
do
|
do
|
||||||
@@ -251,7 +251,7 @@ feature -- Extra
|
|||||||
orig_path_info: detachable STRING
|
orig_path_info: detachable STRING
|
||||||
-- Original version of `path_info' before processed by Current environment
|
-- Original version of `path_info' before processed by Current environment
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT} -- Update
|
feature {GW_REQUEST} -- Update
|
||||||
|
|
||||||
set_orig_path_info (s: STRING)
|
set_orig_path_info (s: STRING)
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ feature -- Status report
|
|||||||
Result := has (a_name)
|
Result := has (a_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
feature {GW_REQUEST, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
||||||
|
|
||||||
set_variable (a_name: STRING; a_value: STRING_32)
|
set_variable (a_name: STRING; a_value: STRING_32)
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ note
|
|||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
GW_REQUEST_CONTEXT
|
GW_REQUEST
|
||||||
|
|
||||||
feature -- Access: Input/Output
|
feature -- Access: Input/Output
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ feature -- Status report
|
|||||||
Result := table.has (a_name)
|
Result := table.has (a_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
feature {GW_REQUEST, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
||||||
|
|
||||||
set_variable (a_name: STRING; a_value: STRING_32)
|
set_variable (a_name: STRING; a_value: STRING_32)
|
||||||
do
|
do
|
||||||
@@ -112,7 +112,7 @@ feature -- Access: table
|
|||||||
create Result.make (table)
|
create Result.make (table)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT} -- Element change
|
feature {GW_REQUEST} -- Element change
|
||||||
|
|
||||||
add_variable (v: STRING_32; k: STRING_32)
|
add_variable (v: STRING_32; k: STRING_32)
|
||||||
-- Added `k,v' to variables table
|
-- Added `k,v' to variables table
|
||||||
@@ -125,7 +125,7 @@ feature {GW_REQUEST_CONTEXT} -- Element change
|
|||||||
table.force (v, k)
|
table.force (v, k)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT} -- Element change
|
feature {GW_REQUEST} -- Element change
|
||||||
|
|
||||||
table: HASH_TABLE [STRING_32, STRING_32]
|
table: HASH_TABLE [STRING_32, STRING_32]
|
||||||
-- Variables table
|
-- Variables table
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ feature -- Access
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {GW_REQUEST_CONTEXT, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
feature {GW_REQUEST, GW_APPLICATION, GW_CONNECTOR} -- Element change
|
||||||
|
|
||||||
set_variable (a_name: STRING; a_value: G)
|
set_variable (a_name: STRING; a_value: G)
|
||||||
require
|
require
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ feature -- Process request
|
|||||||
|
|
||||||
feature {NONE} -- Execution
|
feature {NONE} -- Execution
|
||||||
|
|
||||||
execute (req: GW_REQUEST_CONTEXT; res: GW_RESPONSE)
|
execute (req: GW_REQUEST; res: GW_RESPONSE)
|
||||||
-- Execute the request
|
-- Execute the request
|
||||||
-- See `req.input' and `res.output' for i/o streams
|
-- See `req.input' and `res.output' for i/o streams
|
||||||
-- `req.environment' for the Gateway environment
|
-- `req.environment' for the Gateway environment
|
||||||
@@ -44,12 +44,12 @@ feature {NONE} -- Execution
|
|||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
post_execute (req: detachable GW_REQUEST_CONTEXT; res: detachable GW_RESPONSE)
|
post_execute (req: detachable GW_REQUEST; res: detachable GW_RESPONSE)
|
||||||
-- Operation processed after `execute', or after `rescue_execute'
|
-- Operation processed after `execute', or after `rescue_execute'
|
||||||
do
|
do
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue_execute (req: detachable GW_REQUEST_CONTEXT; res: detachable GW_RESPONSE; a_exception: detachable EXCEPTION)
|
rescue_execute (req: detachable GW_REQUEST; res: detachable GW_RESPONSE; a_exception: detachable EXCEPTION)
|
||||||
-- Operation processed on rescue of `execute'
|
-- Operation processed on rescue of `execute'
|
||||||
do
|
do
|
||||||
post_execute (req, res)
|
post_execute (req, res)
|
||||||
@@ -57,7 +57,7 @@ feature {NONE} -- Execution
|
|||||||
|
|
||||||
feature -- Factory
|
feature -- Factory
|
||||||
|
|
||||||
new_request_context (env: GW_ENVIRONMENT; a_input: GW_INPUT_STREAM): GW_REQUEST_CONTEXT
|
new_request_context (env: GW_ENVIRONMENT; a_input: GW_INPUT_STREAM): GW_REQUEST
|
||||||
-- New Request context based on `env' and `a_input'
|
-- New Request context based on `env' and `a_input'
|
||||||
--| note: you can redefine this function to create your own
|
--| note: you can redefine this function to create your own
|
||||||
--| descendant of GW_REQUEST_CONTEXT , or even to reuse/recycle existing
|
--| descendant of GW_REQUEST_CONTEXT , or even to reuse/recycle existing
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ feature -- Execution
|
|||||||
|
|
||||||
feature -- Factory
|
feature -- Factory
|
||||||
|
|
||||||
new_request_context (env: GW_ENVIRONMENT; a_input: GW_INPUT_STREAM): GW_REQUEST_CONTEXT
|
new_request_context (env: GW_ENVIRONMENT; a_input: GW_INPUT_STREAM): GW_REQUEST
|
||||||
do
|
do
|
||||||
create {GW_REQUEST_CONTEXT_IMP} Result.make (env, a_input)
|
create {GW_REQUEST_IMP} Result.make (env, a_input)
|
||||||
Result.execution_variables.set_variable (request_count.out, "REQUEST_COUNT")
|
Result.execution_variables.set_variable (request_count.out, "REQUEST_COUNT")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ note
|
|||||||
revision: "$Revision$"
|
revision: "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
GW_REQUEST_CONTEXT_IMP
|
GW_REQUEST_IMP
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
GW_REQUEST_CONTEXT
|
GW_REQUEST
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
Reference in New Issue
Block a user