 
     # TODO: Automatically disconnects from removed servers.
 
-    # Connections to users.
-    @connections = {}
-    @_nextConId = 0
-
   # Returns an object from its key or UUID.
   getObject: (key, type) ->
     # Gracefully handles UUIDs.

      tokens = $wait @tokens.get {user_id: id}
      if tokens.length
        @tokens.remove (token.id for token in tokens)

    # Collections of XAPI objects mapped to XO API.
    @_xobjs = new $MappedCollection()
    (require './spec').call @_xobjs

    # When objects enter or exists, sends a notification to all
    # connected clients.

#=====================================================================

class $XO extends $EventEmitter

  constructor: ->
    # These will be initialized in start().
    @servers = @tokens = @users =  @_UUIDsToKeys = null

    # Connections to Xen servers/pools.
    @_xapis = Object.create null

    # Connections to users.
    @connections = Object.create null
    @_nextConId = 0

    # Collections of XAPI objects mapped to XO API.
    @_xobjs = new $MappedCollection()
    $spec.call @_xobjs

  start: (config) ->
    # Connects to Redis.
