def _register_process_entry(self, process_entry, call_back):
        """ method parses process_entry and creates a timer_handler out of it
         timer_handler is enlisted to either :self.freerun_handlers or :self.managed_handlers
         timer_handler is started, unless it is marked as STATE_OFF """
        trigger_frequency = process_entry.trigger_frequency
        if isinstance(process_entry, ManagedProcessEntry):
            handler_key = process_entry.process_name
            handler = ManagedThreadHandler(self.logger, handler_key, trigger_frequency, call_back, process_entry)
            self.managed_handlers[handler.key] = handler
        elif isinstance(process_entry, FreerunProcessEntry):
            handler_key = (process_entry.process_name, process_entry.entry_name)
            handler = FreerunThreadHandler(self.logger, handler_key, trigger_frequency, call_back, process_entry)
            self.freerun_handlers[handler.key] = handler
        else:
            raise ValueError('ProcessEntry type {0} is not known to the system. Skipping it.'
                             .format(process_entry.__class__.__name__))

        if process_entry.is_on:
            handler.activate()
            self.logger.info('Started {0} for {1}.'
                             .format(handler.__class__.__name__, handler.key))
        else:
            self.logger.info('Registered {0} for {1}. Idle until activated.'
                             .format(handler.__class__.__name__, handler.key))
def _register_process_entry ( self , process_entry , call_back ) : trigger_frequency = process_entry . trigger_frequency if isinstance ( process_entry , ManagedProcessEntry ) : handler_key = process_entry . process_name handler = ManagedThreadHandler ( self . logger , handler_key , trigger_frequency , call_back , process_entry ) self . managed_handlers [ handler . key ] = handler elif isinstance ( process_entry , FreerunProcessEntry ) : handler_key = ( process_entry . process_name , process_entry . entry_name ) handler = FreerunThreadHandler ( self . logger , handler_key , trigger_frequency , call_back , process_entry ) self . freerun_handlers [ handler . key ] = handler else : raise ValueError ( 'ProcessEntry type {0} is not known to the system. Skipping it.' . format ( process_entry . __class__ . __name__ ) ) if process_entry . is_on : handler . activate ( ) self . logger . info ( 'Started {0} for {1}.' . format ( handler . __class__ . __name__ , handler . key ) ) else : self . logger . info ( 'Registered {0} for {1}. Idle until activated.' . format ( handler . __class__ . __name__ , handler . key ) )
method parses process_entry and creates a timer_handler out of it
         timer_handler is enlisted to either :self.freerun_handlers or :self.managed_handlers
         timer_handler is started, unless it is marked as STATE_OFF