Sha256: 45a2513216363531498db68f6b0d863f5dda52830c873406573bdccaeb17a9e6

Contents?: true

Size: 665 Bytes

Versions: 12

Compression:

Stored size: 665 Bytes

Contents

require 'drb'
require 'drb/acl'
require 'thread'

module Adhearsion
  class Initializer

    class DrbInitializer

      class << self
        
        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
        
        def stop
          DRb.stop_service
        end
        
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 6 rubygems

Version Path
eric-adhearsion-0.8.0 lib/adhearsion/initializer/drb.rb
jicksta-adhearsion-0.7.999 lib/adhearsion/initializer/drb.rb
jicksta-adhearsion-0.8.0 lib/adhearsion/initializer/drb.rb
jicksta-adhearsion-0.8.2 lib/adhearsion/initializer/drb.rb
jicksta-adhearsion-0.8.3 lib/adhearsion/initializer/drb.rb
kenwiesner-adhearsioncw-0.8.3 lib/adhearsion/initializer/drb.rb
mtrudel-adhearsion-0.8.3 lib/adhearsion/initializer/drb.rb
sevenscale-adhearsion-0.8.0 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.3 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.0 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.2 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.1 lib/adhearsion/initializer/drb.rb