Package elisa :: Package core :: Module application :: Class Application

Class Application

source code


Application is the entry point of Elisa. It groups all the necessary elements needed for Elisa to run. It is in charge of instantiating a Config and a PluginRegistry. Application also provides access to input events and data, and holds the user interfaces.

Instance Methods
 
__init__(self, options)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
log_traceback(self)
Log the traceback without stopping the process.
source code
 
log_failure(self, failure)
Log the twisted failure without re-raising the exception.
source code
 
initialize(self)
Load the providers for the different managers, then initialize the interface_controller.
source code
 
initialize_db(self)
initialize the database depending on the configuration
source code
 
start(self)
Execute the application.
source code
twisted.internet.defer.Deferred
stop(self, stop_reactor=True)
Stop the application.
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from BaseApplication
bool
is_power_user(self)
Return whether the user is a "power user".
source code
Class Variables
  log_category = "application"

Inherited from extern.log.log.Loggable: logCategory

Instance Variables
elisa.core.bus.Bus bus
DOCME
elisa.core.config.Config config
Application's configuration file, storing options
elisa.core.input_manager.InputManager input_manager
DOCME
elisa.core.interface_controller.InterfaceController interface_controller
DOCME
elisa.core.metadata_manager.MetadataManager metadata_manager
DOCME
elisa.core.options.Options options
Options passed on the command line when launching elisa
elisa.core.plugin_registry.PluginRegistry plugin_registry
loads and manages the plugins
elisa.core.resource_manager.ResourceManager resource_manager
DOCME
elisa.core.service_manager.ServiceManager service_manager
DOCME
elisa.extern.twisted_storm.store.DeferredStore store
the access point to the database using storm
    Inherited from BaseApplication
bool first_run
wether or not the Application is being executed for the first time.
Properties

Inherited from object: __class__

Method Details

__init__(self, options)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

log_traceback(self)

source code 

Log the traceback without stopping the process. This could ususally be used in parts, where you want to go on and log the exception. Example:

   try:
       component.initialize()
   except:
       # and log all the other exceptions
       path = application.log_traceback()
       self.warning("Initilize Component '%s' failed. Traceback saved at %s" % path)
   self.going_on()
Returns:
path to the file, where the traceback got logged

log_failure(self, failure)

source code 

Log the twisted failure without re-raising the exception. Example in an errback:

   def errback(failure):
       path = application.log_failure(failure)
       self.warning("Connection refused. Full output at %s" % path)
       return
Parameters:
  • failure (twisted.python.failure.Failure) - the failure to log
Returns:
path to the file, where the traceback got logged

start(self)

source code 

Execute the application.

Start the bus and the update checker.

stop(self, stop_reactor=True)

source code 

Stop the application.

Parameters:
  • stop_reactor (bool) - stop the reactor after stopping the application
Returns: twisted.internet.defer.Deferred