Class: Rhoconnect::Server

Direct Known Subclasses

Controller::Base, DefaultServer

Constant Summary

Constants included from Rhoconnect

API_TOKEN_HEADER, API_VERSION, APP_NAME, CLIENT_ID_HEADER, CURRENT_APP, CURRENT_CLIENT, CURRENT_REQUEST, CURRENT_SOURCE, CURRENT_USER, PAGE_OBJECT_COUNT_HEADER, PAGE_TOKEN_HEADER, QUERY_RES, SYNC_VERSION, SourceAdapter, SourceAdapterException, SourceAdapterLoginException, SourceAdapterLogoffException, SourceAdapterObjectConflictErrorException, SourceAdapterServerErrorException, SourceAdapterServerTimeoutException, UNKNOWN_CLIENT, UNKNOWN_SOURCE, VERSION

Class Method Summary collapse

Methods included from Condition::AdminRequired

extended, include_admin_required_condition

Methods included from Condition::LoginRequired

extended, include_login_required_condition

Methods included from Condition::SourceRequired

extended, include_source_required_condition

Methods included from Condition::ClientRequired

extended, include_client_required_condition

Methods included from Condition::Verbs

extended, include_verbs_condition

Methods included from Condition::VerifySuccess

extended, include_verify_success_condition

Methods included from Condition::AddParameter

extended, include_add_parameter_condition

Methods included from Handler::Authenticate::ExecuteMethods

#execute_admin_authenticate_handler, #execute_authenticate_handler, #execute_rps_authenticate_handler

Methods included from Handler::PluginCallbacks::ExecuteMethods

#do_fast_delete, #do_fast_insert, #do_fast_update, #execute_push_objects_handler

Methods included from Handler::Search::ExecuteMethods

#execute_search_handler

Methods included from Handler::Changes::ExecuteMethods

#_extract_cud_params, #_run_cud_handler, #execute_create_handler, #execute_cud_handler, #execute_delete_handler, #execute_update_handler

Methods included from Handler::Query::ExecuteMethods

#execute_query_handler

Methods included from Rhoconnect

#add_to_url_map, #app, #bootstrap, #camelize, #check_and_add, #check_default_secret!, #check_for_schema_field!, #create_admin_user, #create_predefined_source, #environment, #expire_bulk_data, #get_config, #get_random_identifier, #get_token, #getelement, #lap_timer, #log, #register_predefined_source, #remove_from_url_map, #setelement, settings, shutdown, #source_config, #start_app, #start_nodejs_channels, #start_timer, #timenow, #under_score, #unzip_file, #url_map, #which

Class Method Details

.newObject



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/rhoconnect/server.rb', line 187

def new
  # by default, enable this feature
  if not settings.respond_to?(:use_async_model) or settings.use_async_model != false
    set :use_async_model, true
  end
  # this must be called first - because
  # it redefines some of the middleware
  _use_async_framework

  if settings.respond_to?(:stats) and settings.send(:stats) == true
    Rhoconnect.stats = true
  else
    Rhoconnect::Server.disable :stats
    Rhoconnect.stats = false
  end
  Rhoconnect::Server.settings.use_middleware
  #puts "Controller #{self.name} has been initialized with #{middleware.inspect}"
  super
end

.paths(verb = nil) ⇒ Object



36
37
38
39
40
41
# File 'lib/rhoconnect/server.rb', line 36

def self.paths(verb = nil)
  @paths ||= {}
  return @paths if verb.nil?
  @paths[verb] ||= []
  @paths[verb]
end

.set_default(setting, value) ⇒ Object



30
31
32
33
# File 'lib/rhoconnect/server.rb', line 30

def set_default(setting, value)
  @default_settings ||= {}
  @default_settings[setting] = value
end