Parent

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 399
399:     def initialize(broker)
400:       @broker = broker
401:     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 408
408:     def apiVersion(authKey, version)
409:       return 0 unless @broker.checkKey(authKey, 'apiVersion')
410: 
411:       version == 1 ? 1 : 1
412:     end
command(authKey, cmd, args) click to toggle source
     # File lib/daemon/ProjectBroker.rb, line 414
414:     def command(authKey, cmd, args)
415:       return false unless @broker.checkKey(authKey, cmd)
416: 
417:       case cmd
418:       when :status
419:         @broker.status
420:       when :stop
421:         @broker.stop
422:       when :addProject
423:         @broker.addProject
424:       when :removeProject
425:         @broker.removeProject(args)
426:       when :getProject
427:         @broker.getProject(args)
428:       else
429:         LogFile.instance.fatal('Unknown command #{cmd} called')
430:       end
431:     end
updateState(authKey, id, status) click to toggle source
     # File lib/daemon/ProjectBroker.rb, line 433
433:     def updateState(authKey, id, status)
434:       @broker.updateState(authKey, id, status)
435:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.