Sha256: bd1c65ff48ee8d78f4561e18338e7ad022ad3d3459431dd2d56ee33585ab6931

Contents?: true

Size: 611 Bytes

Versions: 19

Compression:

Stored size: 611 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

19 entries across 19 versions & 3 rubygems

Version Path
adhearsion-1.2.6 lib/adhearsion/initializer/drb.rb
adhearsion-1.2.5 lib/adhearsion/initializer/drb.rb
adhearsion-1.2.4 lib/adhearsion/initializer/drb.rb
adhearsion-1.2.3 lib/adhearsion/initializer/drb.rb
adhearsion-1.2.1 lib/adhearsion/initializer/drb.rb
adhearsion-1.2.0 lib/adhearsion/initializer/drb.rb
adhearsion-1.1.1 lib/adhearsion/initializer/drb.rb
adhearsion-1.1.0 lib/adhearsion/initializer/drb.rb
adhearsion-1.0.3 lib/adhearsion/initializer/drb.rb
adhearsion-1.0.2 lib/adhearsion/initializer/drb.rb
adhearsion-cw-1.0.2.3 lib/adhearsion/initializer/drb.rb
adhearsion-cw-1.0.2.2 lib/adhearsion/initializer/drb.rb
adhearsion-cw-1.0.2.1 lib/adhearsion/initializer/drb.rb
adhearsion-1.0.1 lib/adhearsion/initializer/drb.rb
adhearsion-1.0.0 lib/adhearsion/initializer/drb.rb
rene-adhearsion-0.8.6 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.6 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.5 lib/adhearsion/initializer/drb.rb
adhearsion-0.8.4 lib/adhearsion/initializer/drb.rb