         ##
         constructor: (@parent)->
             super null, @parent
-            
+
             @_status = []
-        
+
             @_hiddenKeys.push 'data', 'parent', 'children', 'permissions', 'lookup', 'configure', 'init', 'boot', 'booting', 'booted', 'start', 'started', 'running', 'shutdown', 'stop', 'stopped', 'error', 'delegate'
-            
-        
-        ##
-        ##
-        ##
-        init: (config={}, done)->         
-            
+
+
+        ##
+        ##
+        ##
+        init: (config={}, done)->
+
             config = @configure config
-            
+
             @id = config.id
-                    
+
             @ID = if !(@parent?.ID) then @id else @parent.ID+'.'+@id
-            
+
             if typeof (@type = config.type) is 'function'
                 @type = @ID+'.'+(@type.name || 'DynContext')
-            
+
             @data = new floyd.data.SearchableMap config.data, @parent?.data
 
             @logger = @_createLogger @ID
-            
+
             if @data.permissions
                 @logger.warning '@data.permissions is deprecated use config.permissions instead'
                 config.permissions = @data.permissions
-            
+
             @permissions = config.permissions
-            
+
             @identity = @_createIdentity()
 
             @_emitter = @_createEmitter config
-            
+
             @children = new floyd.data.MappedCollection()
 
             @_changeStatus 'configured'
-            
+
             process.nextTick ()=>
                 @_process config.children,
-                    
+
                     each: (child, next)=>
-                        
+
                         @_createChild child, next
-                            
+
                     done: done
 
         ##

        ##
        stop: (done)->
            @_changeStatus 'shutdown'
                        
            @_init 'stop', 'stopped', done

        
        ##
        ##
        ##
        lookup: (name, identity, done)->
            if !identity || !identity.id || !identity.token
                return done new Error '2. parameter is not identity'
            
            ## myself
            if name is @id
                @logger.debug 'found(%s) for %s', @ID, identity.id
                return @forIdentity identity, done
            
            ## children
            if (base = name.split('.').shift()) is @id
                base = (name = name.substr base.length + 1).split('.').shift()
            
            for child in @children 
                if child.id is base
                    @logger.debug 'delegate lookup(%s) to child %s for %s', name, child.ID, identity.id
                    return child.lookup name, identity, done
            
            ## parent
            if @parent?.lookup
                @logger.debug 'delegate lookup(%s) to parent %s for %s', name, @parent.ID, identity.id
                return @parent.lookup name, identity, done
            
            ## global
            if floyd.__parent?.lookup
                @logger.debug 'delegate lookup(%s) to global parent for %s', name, identity.id
                return floyd.__parent.lookup name, identity, done
            
            ## not found
            @logger.debug 'lookup(%s) failed for %s', name, identity.id
            done new Error 'Context not found: '+name
            
        
        ##
        ## delegates a method call down the hirarchy
        ## propagates errors if the last value in args is a fn

    ## construct -> start -> stop
    ##
    class FloydContext extends floyd.auth.Controllable


        ##
        ## TODO configuration procedure documentation
        ##
        ## * id
