diff --git a/examples/debug/debug.ecf b/examples/debug/debug.ecf new file mode 100644 index 00000000..d4ed430b --- /dev/null +++ b/examples/debug/debug.ecf @@ -0,0 +1,45 @@ + + + + + /EIFGENs$ + /CVS$ + /.svn$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/debug/launcher/any/application_launcher.e b/examples/debug/launcher/any/application_launcher.e new file mode 100644 index 00000000..0ef505c3 --- /dev/null +++ b/examples/debug/launcher/any/application_launcher.e @@ -0,0 +1,19 @@ +note + description: "[ + Effective class for APPLICATION_LAUNCHER_I + + You can put modification in this class + ]" + date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $" + revision: "$Revision: 36 $" + +class + APPLICATION_LAUNCHER + +inherit + APPLICATION_LAUNCHER_I + +feature -- Custom + +end + diff --git a/examples/debug/launcher/any/application_launcher_i.e b/examples/debug/launcher/any/application_launcher_i.e new file mode 100644 index 00000000..0744c801 --- /dev/null +++ b/examples/debug/launcher/any/application_launcher_i.e @@ -0,0 +1,102 @@ +note + description: "[ + Specific application launcher + + DO NOT EDIT THIS CLASS + + you can customize APPLICATION_LAUNCHER + ]" + date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $" + revision: "$Revision: 36 $" + +deferred class + APPLICATION_LAUNCHER_I + +inherit + SHARED_EXECUTION_ENVIRONMENT + +feature -- Execution + + launch (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS) + local + nature: like launcher_nature + do + nature := launcher_nature + if nature = Void or else nature = nature_nino then + launch_nino (a_service, opts) + elseif nature = nature_cgi then + launch_cgi (a_service, opts) + elseif nature = nature_libfcgi then + launch_libfcgi (a_service, opts) + else + -- bye bye + (create {EXCEPTIONS}).die (-1) + end + end + +feature {NONE} -- Access + + launcher_nature: detachable READABLE_STRING_8 + -- Initialize the launcher nature + -- either cgi, libfcgi, or nino. + --| We could extend with more connector if needed. + --| and we could use WSF_DEFAULT_SERVICE_LAUNCHER to configure this at compilation time. + local + p: PATH + l_entry_name: READABLE_STRING_32 + ext: detachable READABLE_STRING_32 + do + create p.make_from_string (execution_environment.arguments.command_name) + if attached p.entry as l_entry then + ext := l_entry.extension + end + if ext /= Void then + if ext.same_string (nature_nino) then + Result := nature_nino + end + if ext.same_string (nature_cgi) then + Result := nature_cgi + end + if ext.same_string (nature_libfcgi) or else ext.same_string ("fcgi") then + Result := nature_libfcgi + end + end + end + +feature {NONE} -- nino + + nature_nino: STRING = "nino" + + launch_nino (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS) + local + launcher: WSF_NINO_SERVICE_LAUNCHER + do + create launcher.make_and_launch (a_service, opts) + end + +feature {NONE} -- cgi + + nature_cgi: STRING = "cgi" + + launch_cgi (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS) + local + launcher: WSF_CGI_SERVICE_LAUNCHER + do + create launcher.make_and_launch (a_service, opts) + end + +feature {NONE} -- libfcgi + + nature_libfcgi: STRING = "libfcgi" + + launch_libfcgi (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS) + local + launcher: WSF_LIBFCGI_SERVICE_LAUNCHER + do + create launcher.make_and_launch (a_service, opts) + end + + +end + + diff --git a/examples/debug/launcher/default/application_launcher.e b/examples/debug/launcher/default/application_launcher.e new file mode 100644 index 00000000..0ef505c3 --- /dev/null +++ b/examples/debug/launcher/default/application_launcher.e @@ -0,0 +1,19 @@ +note + description: "[ + Effective class for APPLICATION_LAUNCHER_I + + You can put modification in this class + ]" + date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $" + revision: "$Revision: 36 $" + +class + APPLICATION_LAUNCHER + +inherit + APPLICATION_LAUNCHER_I + +feature -- Custom + +end + diff --git a/examples/debug/launcher/default/application_launcher_i.e b/examples/debug/launcher/default/application_launcher_i.e new file mode 100644 index 00000000..2cd4a73d --- /dev/null +++ b/examples/debug/launcher/default/application_launcher_i.e @@ -0,0 +1,26 @@ +note + description: "[ + Specific application launcher + + DO NOT EDIT THIS CLASS + + you can customize APPLICATION_LAUNCHER + ]" + date: "$Date: 2013-06-12 13:55:42 +0200 (mer., 12 juin 2013) $" + revision: "$Revision: 36 $" + +deferred class + APPLICATION_LAUNCHER_I + +feature -- Execution + + launch (a_service: WSF_SERVICE; opts: detachable WSF_SERVICE_LAUNCHER_OPTIONS) + local + launcher: WSF_SERVICE_LAUNCHER + do + create {WSF_DEFAULT_SERVICE_LAUNCHER} launcher.make_and_launch (a_service, opts) + end + +end + + diff --git a/examples/debug/src/ewf_debug_server.e b/examples/debug/src/ewf_debug_server.e new file mode 100644 index 00000000..218b346d --- /dev/null +++ b/examples/debug/src/ewf_debug_server.e @@ -0,0 +1,45 @@ +note + description: "[ + application service + ]" + date: "$Date$" + revision: "$Revision$" + +class + EWF_DEBUG_SERVER + +inherit + WSF_LAUNCHABLE_SERVICE + redefine + initialize + end + + APPLICATION_LAUNCHER + +create + make_and_launch + +feature {NONE} -- Initialization + + initialize + -- Initialize current service. + do + Precursor + set_service_option ("verbose", True) + set_service_option ("port", 9090) + set_service_option ("base", "/www-debug/debug_service.fcgi") + end + + execute (req: WSF_REQUEST; res: WSF_RESPONSE) + local + dbg: WSF_DEBUG_HANDLER + m: WSF_PAGE_RESPONSE + do + create dbg.make + dbg.execute_starts_with ("", req, res) + --create m.make_with_body ("This is ewf debug") + --res.send (m) + end + +end +