Package flumotion :: Package component :: Module component :: Class BaseComponent
[show private | hide private]
[frames | no frames]

Type BaseComponent

object --+    
         |    
   GObject --+
             |
  Loggable --+
             |
            BaseComponent

Known Subclasses:
Bouncer, FeedComponent, FeedComponent

I am the base class for all Flumotion components.
Method Summary
  __init__(self, name)
  adminCallRemote(self, methodName, *args, **kwargs)
Call a remote method on all admin client views on this component.
  do_start(self, *args, **kwargs)
BaseComponent vmethod for starting up.
  emit(self, name, *args)
  getName(self)
  getWorkerName(self)
  setConfig(self, config)
  setMedium(self, medium)
  setMood(self, mood)
Set the given mood on the component if it's different from the current one.
  setWorkerName(self, workerName)
  start(self, *args, **kwargs)
Tell the component to start.
  startHeartbeat(self)
Start sending heartbeats.
  stop(self)
Tell the component to stop.
  stopHeartbeat(self)
Stop sending heartbeats.
  _heartbeat(self)
Send heartbeat to manager and reschedule.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure)
Log a warning about a Failure.
    Inherited from GObject
  __cmp__(x, y)
x.__cmp__(y) <==> cmp(x,y)
  __gobject_init__(...)
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __repr__(x)
x.__repr__() <==> repr(x)
  chain(...)
  connect(...)
  connect_after(...)
  connect_object(...)
  connect_object_after(...)
  disconnect(...)
  emit_stop_by_name(...)
  freeze_notify(...)
  get_data(...)
  get_property(...)
  handler_block(...)
  handler_disconnect(...)
  handler_is_connected(...)
  handler_unblock(...)
  notify(...)
  set_data(...)
  set_property(...)
  stop_emission(...)
  thaw_notify(...)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Instance Variable Summary
string name: the name of the component

Class Variable Summary
GType __gtype__ = <GType flumotion+component+component+BaseCom...
child class of BaseComponentMedium component_medium_class = flumotion.component.component.BaseComponentMedium
str logCategory: Implementors can provide a category to log their messages under.
int _heartbeatInterval = 5                                                                     
    Inherited from GObject
str __gdoc__ = 'Object GObject\n\nSignals from GObject:\n  n...
getset_descriptor __grefcount__ = <attribute '__grefcount__' of 'gobject.G...

Method Details

__init__(self, name)
(Constructor)

Parameters:
name - unique name of the component
           (type=string)
Overrides:
gobject.GObject.__init__

adminCallRemote(self, methodName, *args, **kwargs)

Call a remote method on all admin client views on this component.

This gets serialized through the manager and multiplexed to all admin clients, and from there on to all views connected to each admin client model.

do_start(self, *args, **kwargs)

BaseComponent vmethod for starting up. If you override this method, you are responsible for arranging that the component becomes happy.

setMood(self, mood)

Set the given mood on the component if it's different from the current one.

start(self, *args, **kwargs)

Tell the component to start. This is called when all its dependencies are already started.

To hook onto this method, implement your own do_start method. See BaseComponent.do_start() for what your do_start method is responsible for doing.

Again, don't override this method. Thanks.

startHeartbeat(self)

Start sending heartbeats.

stop(self)

Tell the component to stop. The connection to the manager will be closed. The job process will also finish.

stopHeartbeat(self)

Stop sending heartbeats.

_heartbeat(self)

Send heartbeat to manager and reschedule.

Instance Variable Details

name

the name of the component
Type:
string

Class Variable Details

__gtype__

Type:
GType
Value:
<GType flumotion+component+component+BaseComponent (8137472)>          

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'basecomp'                                                             

_heartbeatInterval

Type:
int
Value:
5                                                                     

Generated by Epydoc 2.1 on Tue Dec 20 15:33:10 2005 http://epydoc.sf.net