Parent

Files

Class Index [+]

Quicksearch

TaskJuggler::ProjectBrokerIface

This class is the DRb interface for ProjectBroker. We only want to expose these methods for remote access.

Public Class Methods

new(broker) click to toggle source
     # File lib/daemon/ProjectBroker.rb, line 346
346:     def initialize(broker)
347:       @broker = broker
348:     end

Public Instance Methods

apiVersion(authKey, version) click to toggle source

Check the authentication key and the client/server version match. The following return values can be generated: 0 : authKey does not match 1 : client and server versions match -1 : client and server versions don’t match

     # File lib/daemon/ProjectBroker.rb, line 355
355:     def apiVersion(authKey, version)
356:       return 0 unless @broker.checkKey(authKey, 'apiVersion')
357: 
358:       version == 1 ? 1 : 1
359:     end
command(authKey, cmd, args) click to toggle source
     # File lib/daemon/ProjectBroker.rb, line 361
361:     def command(authKey, cmd, args)
362:       return false unless @broker.checkKey(authKey, cmd)
363: 
364:       case cmd
365:       when :status
366:         @broker.status
367:       when :stop
368:         @broker.stop
369:       when :addProject
370:         @broker.addProject
371:       when :removeProject
372:         @broker.removeProject(args)
373:       when :getProject
374:         @broker.getProject(args)
375:       else
376:         LogFile.instance.fatal('Unknown command #{cmd} called')
377:       end
378:     end
updateState(authKey, id, status) click to toggle source
     # File lib/daemon/ProjectBroker.rb, line 380
380:     def updateState(authKey, id, status)
381:       @broker.updateState(authKey, id, status)
382:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.