class Rse::Server

Public Class Methods

new(package_basepath=nil, host: '0.0.0.0', port: '61000', debug: false, loghost: nil, logport: '9090', reghost: nil, spshost: nil, app_rsf: nil) click to toggle source
# File lib/rse.rb, line 19
def initialize(package_basepath=nil, host: '0.0.0.0', port: '61000', 
              debug: false, loghost: nil, logport: '9090', 
              reghost: nil, spshost: nil, app_rsf: nil)

  @host, @port, @debug = host, port, debug

  puts 'before spspublog'.info if @debug
  log = loghost ? SPSPubLogDRbClient.new(host: loghost, port: logport) : nil
  
  puts 'before reg'.info if @debug
  reg = reghost ? RemoteDwsRegistry.new(domain: reghost) : nil

  @rs = rs = RSFServices.new reg, package_basepath: package_basepath, 
      log: log, app_rsf: app_rsf, debug: debug
  
  @rs.services['sps'] = SPSPub.new(host: spshost) if spshost
  
  puts 'ready'

end

Public Instance Methods

start() click to toggle source
# File lib/rse.rb, line 40
def start()
  puts 'starting ...'
  puts "druby://#{@host}:#{@port}"
  DRb.start_service "druby://#{@host}:#{@port}", @rs
  DRb.thread.join

end