Class: Adhearsion::Initializer::DrbInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/adhearsion/initializer/drb.rb

Class Method Summary collapse

Class Method Details

.startObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/adhearsion/initializer/drb.rb', line 12

def start
  config = Adhearsion::AHN_CONFIG.drb
  DRb.install_acl ACL.new(config.acl) if config.acl

  drb_door = Object.new
  Components.component_manager.extend_object_with(drb_door, :rpc)

  DRb.start_service "druby://#{config.host}:#{config.port}", drb_door

  ahn_log "Starting DRb on #{config.host}:#{config.port}"
end

.stopObject



24
25
26
# File 'lib/adhearsion/initializer/drb.rb', line 24

def stop
  DRb.stop_service
end