Module: RSence
- Defined in:
- lib/rsence.rb,
lib/rsence/msg.rb,
lib/rsence/argv.rb,
lib/rsence/value.rb,
lib/rsence/daemon.rb,
lib/rsence/plugins.rb,
lib/rsence/plugins.rb,
lib/rsence/sigcomm.rb,
lib/rsence/http/broker.rb,
lib/rsence/http/rackup.rb,
lib/rsence/transporter.rb,
lib/rsence/dependencies.rb,
lib/rsence/http/request.rb,
lib/rsence/valuemanager.rb,
lib/rsence/http/response.rb,
lib/rsence/pluginmanager.rb,
lib/rsence/argv/argv_util.rb,
lib/rsence/argv/env_check.rb,
lib/rsence/argv/help_argv.rb,
lib/rsence/argv/save_argv.rb,
lib/rsence/argv/test_port.rb,
lib/rsence/default_config.rb,
lib/rsence/plugins/plugin.rb,
lib/rsence/sessionmanager.rb,
lib/rsence/sessionstorage.rb,
lib/rsence/plugins/servlet.rb,
lib/rsence/argv/status_argv.rb,
lib/rsence/argv/initenv_argv.rb,
lib/rsence/argv/startup_argv.rb,
lib/rsence/plugins/guiparser.rb,
lib/rsence/plugins/gui_plugin.rb,
lib/rsence/plugins/plugin_base.rb,
lib/rsence/plugins/plugin_plugins.rb,
lib/rsence/plugins/plugin_sqlite_db.rb
Overview
The RSence module contains the server interfaces of RSence.
The classes that matter from a Plugin developer’s point of view are:
-
-
Use for user interface plugins. Supports GUITree handling; the user interface starts automatically.
-
No server programming except defining GUITree YAML structures is required to define a user interface when using this class.
-
-
-
Use for supporting plugins and advanced client-server development.
-
Great for providing backend functionality and miscellaneous API’s for other Plugins.
-
-
-
Use for raw POST / GET handlers to provide external API’s, search engine indexes, plain html fallback etc.
-
-
-
Use for syncing data objects between client and server automatically.
-
Bind any plugin methods as responders / validators; they will be called whenever a client-server change triggers an data change event.
-
-
-
Used extensively to pass around session, data and request/response bindings.
-
The standard convention is usage as the first parameter, named
msg
, of any method that includes handling session-related data.
-
Most other classes are inner workings of RSence itself and are subject to change without further notice.
Defined Under Namespace
Modules: ArgvUtil, Broker, Plugins Classes: Configuration, Dependencies, HValue, Message, PluginManager, Request, Response, SessionManager, SessionStorage, Transporter
Class Method Summary collapse
-
.args ⇒ Hash
- Command line options parsed Key (Symbol)
- Value
:env_path
-
(String) The directory of the environment.
- Value
-
.config ⇒ Hash
RSence runtime configuration data.
- .env_path ⇒ Object
- .plugin_manager ⇒ Object
- .plugin_manager=(plugin_manager) ⇒ Object
- .session_manager ⇒ Object
- .session_manager=(session_manager) ⇒ Object
- .transporter ⇒ Object
- .transporter=(transporter) ⇒ Object
- .value_manager ⇒ Object
- .value_manager=(value_manager) ⇒ Object
-
.version ⇒ String
The version of RSence.
Instance Method Summary collapse
-
#randgen ⇒ Object
Unique random number generator:.
Class Method Details
.args ⇒ Hash
Command line options parsed
- Key (Symbol)
-
Value
:env_path
-
(String) The directory of the environment.
:conf_files
-
(Array of Strings) Additional configuration files given with the
--conf
command-line option. Default is[]
. :debug
-
(true or false) True, if the
-d
or--debug
command-line option was given. Default is false. :verbose
-
(true or false) True, if the
-v
or--verbose
command-line option was given. Default is false. :log_fg
-
(true or false) True, if the
-f
or--log-fg
command-line option was given. Default is false. :trace_js
-
(true or false) True, if the
--trace-js
command-line option was given. Default is false. :trace_delegate
-
(true or false) True, if the
--trace-delegate
command-line option was given. Default is false. :port
-
(String or nil) The TCP port number given with the
--port
command-line option. Default is nil. :addr
-
(String or nil) The TCP bind address given with the
--addr
command-line option. Default is nil. :server
-
(String or nil) The Rack http server handler given with the
--server
command-line option. Default is nil. :reset_ses
-
(true or false) True, if the
-r
or--reset-sessions
command-line option was given. Default is false. :autoupdate
-
(true or false) True, if the
-a
or--auto-update
command-line option was given. Default is false. :latency
-
(Number) Amount of milliseconds to sleep in each request given with the
--latency
command-line option. Default is 0. :say
-
(true or false) True, if the
-S
or--say
command-line option was given. Default is false.
77 |
# File 'lib/rsence.rb', line 77 def self.args; @@argv_parser.args; end |
.config ⇒ Hash
RSence runtime configuration data
96 97 98 |
# File 'lib/rsence.rb', line 96 def self.config @@config end |
.env_path ⇒ Object
79 |
# File 'lib/rsence.rb', line 79 def self.env_path; @@argv_parser.args[:env_path]; end |
.plugin_manager ⇒ Object
112 113 114 |
# File 'lib/rsence.rb', line 112 def self.plugin_manager @@plugin_manager end |
.plugin_manager=(plugin_manager) ⇒ Object
115 116 117 118 119 120 121 122 |
# File 'lib/rsence.rb', line 115 def self.plugin_manager=(plugin_manager) if class_variable_defined?(:'@@plugin_manager') warn "WARN: @@plugin_manager already set." return else @@plugin_manager = plugin_manager end end |
.session_manager ⇒ Object
136 137 138 |
# File 'lib/rsence.rb', line 136 def self.session_manager @@session_manager end |
.session_manager=(session_manager) ⇒ Object
139 140 141 142 143 144 145 146 |
# File 'lib/rsence.rb', line 139 def self.session_manager=(session_manager) if class_variable_defined?(:'@@session_manager') warn "WARN: @@session_manager already set." return else @@session_manager = session_manager end end |
.transporter ⇒ Object
100 101 102 |
# File 'lib/rsence.rb', line 100 def self.transporter @@transporter end |
.transporter=(transporter) ⇒ Object
103 104 105 106 107 108 109 110 |
# File 'lib/rsence.rb', line 103 def self.transporter=(transporter) if class_variable_defined?(:'@@transporter') warn "WARN: Transporter already set." return else @@transporter = transporter end end |
.value_manager ⇒ Object
124 125 126 |
# File 'lib/rsence.rb', line 124 def self.value_manager @@value_manager end |
.value_manager=(value_manager) ⇒ Object
127 128 129 130 131 132 133 134 |
# File 'lib/rsence.rb', line 127 def self.value_manager=(value_manager) if class_variable_defined?(:'@@value_manager') warn "WARN: @@value_manager already set." return else @@value_manager = value_manager end end |
.version ⇒ String
Returns The version of RSence.
85 |
# File 'lib/rsence.rb', line 85 def self.version; @@argv_parser.version; end |
Instance Method Details
#randgen ⇒ Object
Unique random number generator:
20 |
# File 'lib/rsence/sessionmanager.rb', line 20 require 'randgen' |