Added openshift connector classes (for experimentation)

This commit is contained in:
Jocelyn Fiat
2012-12-20 10:09:49 +01:00
parent 27d2308d6f
commit 1e6d273254
6 changed files with 194 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
note
description: "[
Component to launch the service using the default connector
Eiffel Web Nino customized for OpenShift
This default connector support options:
base: base_url (very specific to standalone server)
verbose: to display verbose output, useful for Nino
force_single_threaded: use only one thread, useful for Nino
check WSF_SERVICE_LAUNCHER for more documentation
]"
date: "$Date$"
revision: "$Revision$"
class
WSF_OPENSHIFT_SERVICE_LAUNCHER
inherit
WSF_NINO_SERVICE_LAUNCHER
redefine
initialize
end
create
make,
make_and_launch,
make_callback,
make_callback_and_launch
feature {NONE} -- Initialization
initialize
local
l_env: EXECUTION_ENVIRONMENT
do
Precursor
create l_env
if attached l_env.get (Openshift_port) as l_port then
if l_port.is_integer then
port_number := l_port.to_integer
else
die ("could not parse " + Openshift_port)
end
else
die (Openshift_port + " is not defined")
end
end
feature {NONE} -- Implementation
die (a_message: STRING)
-- Die with `a_message'.
local
l_exceptions: EXCEPTIONS
do
io.put_string (a_message)
io.put_new_line
create l_exceptions
l_exceptions.die (1)
end
Openshift_ip: STRING = "OPENSHIFT_INTERNAL_IP"
-- OpenShift IP environment variable name
Openshift_port: STRING = "OPENSHIFT_INTERNAL_PORT"
-- OpenShift port environment variable name
;note
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
5949 Hollister Ave., Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end