renamed GW_REQUEST_CONTEXT as GW_REQUEST
This commit is contained in:
@@ -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 {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
|
||||
res.output.put_header (200, <<["Content-Type", "text/plain"]>>)
|
||||
res.output.put_string ("Hello World!%N")
|
||||
|
||||
@@ -581,7 +581,7 @@ feature -- Extra
|
||||
deferred
|
||||
end
|
||||
|
||||
feature {GW_REQUEST_CONTEXT} -- Element change
|
||||
feature {GW_REQUEST} -- Element change
|
||||
|
||||
set_orig_path_info (s: STRING)
|
||||
-- Set ORIG_PATH_INFO to `s'
|
||||
|
||||
@@ -102,7 +102,7 @@ feature -- Access
|
||||
Result := table.has_key (a_name)
|
||||
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)
|
||||
do
|
||||
@@ -251,7 +251,7 @@ feature -- Extra
|
||||
orig_path_info: detachable STRING
|
||||
-- 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)
|
||||
do
|
||||
|
||||
@@ -31,7 +31,7 @@ feature -- Status report
|
||||
Result := has (a_name)
|
||||
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)
|
||||
do
|
||||
|
||||
@@ -13,7 +13,7 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
GW_REQUEST_CONTEXT
|
||||
GW_REQUEST
|
||||
|
||||
feature -- Access: Input/Output
|
||||
|
||||
@@ -51,7 +51,7 @@ feature -- Status report
|
||||
Result := table.has (a_name)
|
||||
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)
|
||||
do
|
||||
@@ -112,7 +112,7 @@ feature -- Access: table
|
||||
create Result.make (table)
|
||||
end
|
||||
|
||||
feature {GW_REQUEST_CONTEXT} -- Element change
|
||||
feature {GW_REQUEST} -- Element change
|
||||
|
||||
add_variable (v: STRING_32; k: STRING_32)
|
||||
-- Added `k,v' to variables table
|
||||
@@ -125,7 +125,7 @@ feature {GW_REQUEST_CONTEXT} -- Element change
|
||||
table.force (v, k)
|
||||
end
|
||||
|
||||
feature {GW_REQUEST_CONTEXT} -- Element change
|
||||
feature {GW_REQUEST} -- Element change
|
||||
|
||||
table: HASH_TABLE [STRING_32, STRING_32]
|
||||
-- Variables table
|
||||
|
||||
@@ -46,7 +46,7 @@ feature -- Access
|
||||
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)
|
||||
require
|
||||
|
||||
@@ -30,7 +30,7 @@ feature -- Process request
|
||||
|
||||
feature {NONE} -- Execution
|
||||
|
||||
execute (req: GW_REQUEST_CONTEXT; res: GW_RESPONSE)
|
||||
execute (req: GW_REQUEST; res: GW_RESPONSE)
|
||||
-- Execute the request
|
||||
-- See `req.input' and `res.output' for i/o streams
|
||||
-- `req.environment' for the Gateway environment
|
||||
@@ -44,12 +44,12 @@ feature {NONE} -- Execution
|
||||
do
|
||||
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'
|
||||
do
|
||||
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'
|
||||
do
|
||||
post_execute (req, res)
|
||||
@@ -57,7 +57,7 @@ feature {NONE} -- Execution
|
||||
|
||||
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'
|
||||
--| note: you can redefine this function to create your own
|
||||
--| descendant of GW_REQUEST_CONTEXT , or even to reuse/recycle existing
|
||||
|
||||
@@ -30,9 +30,9 @@ feature -- Execution
|
||||
|
||||
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
|
||||
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")
|
||||
end
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@ note
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
GW_REQUEST_CONTEXT_IMP
|
||||
GW_REQUEST_IMP
|
||||
|
||||
inherit
|
||||
GW_REQUEST_CONTEXT
|
||||
GW_REQUEST
|
||||
|
||||
create
|
||||
make
|
||||
Reference in New Issue
Block a user