Package elisa :: Package core :: Module interface_controller :: Class InterfaceController

Class InterfaceController

source code


The InterfaceController is responsible for creating, managing and storing the different elisa.core.components.frontend.Frontends the user has defined in the configuration file.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
twisted.internet.defer.Deferred
initialize(self)
Read the configuration of the application and create the frontends that are specified in it.
source code
twisted.internet.defer.DeferredList
stop(self)
Clean up the given frontends.
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__

Class Variables

Inherited from extern.log.log.Loggable: logCategory

Instance Variables
dict frontends
maps the name of a frontend to the instance
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

initialize(self)

source code 

Read the configuration of the application and create the frontends that are specified in it. The configuration could for example look like this:

   [general]
       ...
   frontends = ['opengl', 'statusicon', 'lcd']

   [opengl]
   frontend = 'pigment.pigment_frontend:PigmentFrontend'

   [statusicon]
   frontend = 'gtk.status_frontend:StatusFrontend'

   [lcd]
   frontend = 'lcg.lcd_frontend:LCDFrontend'

If the frontend-option in such a section is missing, the failure-Exception for that certain frontend is the FrontendOptionMissing.

Returns: twisted.internet.defer.Deferred
resulting in a list with a tuple of values where the first value is True/False to identify if it worked, the second one is the name of the frontend and the third one is either the frontend object if it worked or the Failure if it failed.

stop(self)

source code 

Clean up the given frontends.

Returns: twisted.internet.defer.DeferredList
that fires when the clean up of all frontends is done