Class: Rse::Server
- Inherits:
-
Object
- Object
- Rse::Server
- Defined in:
- lib/rse.rb
Instance Method Summary collapse
-
#initialize(package_basepath = nil, host: '0.0.0.0', port: '61000', debug: false, loghost: nil, logport: '9090', log: nil, reghost: nil, spshost: nil, app_rsf: nil) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(package_basepath = nil, host: '0.0.0.0', port: '61000', debug: false, loghost: nil, logport: '9090', log: nil, reghost: nil, spshost: nil, app_rsf: nil) ⇒ Server
Returns a new instance of Server.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rse.rb', line 19 def initialize(package_basepath=nil, host: '0.0.0.0', port: '61000', debug: false, loghost: nil, logport: '9090', log: nil, reghost: nil, spshost: nil, app_rsf: nil) @host, @port, @debug = host, port, debug puts 'before spspublog'.info if @debug log2 = if log then log elsif loghost SPSPubLogDRbClient.new(host: loghost, port: logport) end puts 'before reg'.info if @debug reg = reghost ? RemoteDwsRegistry.new(domain: reghost) : nil @rs = rs = RSFServices.new reg, package_basepath: package_basepath, log: log2, app_rsf: app_rsf, debug: debug @rs.services['sps'] = SPSPub.new(host: spshost) if spshost puts 'ready' end |
Instance Method Details
#start ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/rse.rb', line 45 def start() puts 'starting ...' puts "druby://#{@host}:#{@port}" DRb.start_service "druby://#{@host}:#{@port}", @rs DRb.thread.join end |