   isStopped   : -> @status?.state is Machine.State.Stopped
   isUsable    : -> @isRunning() or @isStopped()
   getOldOwner : -> @jMachine.meta.oldOwner
+

doesQueryStringValid  = require '../util/doesQueryStringValid'
nick                  = require '../util/nick'
globals               = require 'globals'


module.exports = class Machine extends KDObject

  @State = {



    { kontrol } = kd.singletons

    # this is a chance for other middlewares to inject their own kite/klient.
    klient = runMiddlewares.sync this, 'getBaseKite', createIfNotExists

    return klient  if klient

    klient = kontrol.kites?.klient?[@uid]
    return klient  if klient

