Package flumotion :: Package component :: Package misc :: Package httpfile :: Module httpfile :: Class HTTPFileStreamer
[hide private]

Class HTTPFileStreamer

source code

              object --+        
                       |        
 common.common.InitMixin --+    
                           |    
     common.log.Loggable --+    
                           |    
              object --+   |    
                       |   |    
         gobject.GObject --+    
                           |    
     component.BaseComponent --+
                               |
     common.log.Loggable --+   |
                           |   |
base.http.HTTPAuthentication --+
                               |
         common.log.Loggable --+
                               |
                              HTTPFileStreamer

Nested Classes [hide private]
child class of BaseComponentMedium componentMediumClass
the medium class to use for this component
Instance Methods [hide private]
 
__init__(self)
Subclasses should not override __init__ at all.
source code
 
init(self)
A subclass should do as little as possible in its init method.
source code
 
getDescription(self) source code
 
do_setup(self)
Subclasses can implement me to set up the component before it is started.
source code
 
do_stop(self)
BaseComponent vmethod for stopping.
source code
 
updatePorterDetails(self, path, username, password)
Provide a new set of porter login information, for when we're in slave mode and the porter changes.
source code
 
do_start(self, *args, **kwargs)
BaseComponent vmethod for starting up.
source code
 
do_check(self)
Subclasses can implement me to run any checks before the component performs setup.
source code
 
_timeoutRequests(self) source code
 
requestStarted(self, request) source code
 
requestFinished(self, request, bytesWritten, timeConnected) source code
 
getUrl(self) source code
 
getStreamData(self) source code
 
getLoadData(self)
Return a tuple (deltaadded, deltaremoved, bytes_transferred, current_clients, current_load) of our current bandwidth and user values.
source code
 
authenticateKeycard(self, bouncerName, keycard) source code
 
cleanupKeycard(self, bouncerName, keycard) source code
 
clientDone(self, fd) source code
 
rotateLog(self)
Close the logfile, then reopen using the previous logfilename
source code

Inherited from component.BaseComponent: addMessage, adminCallRemote, emit, fixRenamedProperties, getMood, getName, getWorkerName, setMedium, setMood, setShutdownHook, setWorkerName, setup, start, stop

Inherited from base.http.HTTPAuthentication: authenticate, cleanupAuth, expireKeycard, setBouncerName, setDefaultDuration, setDomain, setIssuerClass, setRequesterId, startAuthentication

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

Inherited from gobject.GObject: __cmp__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Class Variables [hide private]
  REQUEST_TIMEOUT = 30
  __implemented__ = <implementedBy flumotion.component.misc.http...
  __provides__ = <zope.interface.declarations.ClassProvides obje...

Inherited from component.BaseComponent: __gtype__, logCategory

Inherited from base.http.HTTPAuthentication: __reserve_fds__

Instance Variables [hide private]

Inherited from component.BaseComponent: medium, name

Properties [hide private]

Inherited from gobject.GObject: __grefcount__

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Subclasses should not override __init__ at all.

Instead, they should implement init(), which will be called by this implementation automatically.

See flumotion.common.common.InitMixin for more details.

Overrides: object.__init__
(inherited documentation)

init(self)

source code 

A subclass should do as little as possible in its init method. In particular, it should not try to access resources.

Failures during init are marshalled back to the manager through the worker's remote_create method, since there is no component state proxied to the manager yet at the time of init.

Overrides: component.BaseComponent.init
(inherited documentation)

do_setup(self)

source code 

Subclasses can implement me to set up the component before it is started. It should set up the component, possibly opening files and resources. Non-programming errors should not be raised, but returned as a failing deferred.

self.config will be set before this is called.

Returns:
twisted.internet.defer.Deferred
Overrides: component.BaseComponent.do_setup
(inherited documentation)

do_stop(self)

source code 

BaseComponent vmethod for stopping. The component should do any cleanup it needs, but must not set the component's mood to sleeping.

Returns:
twisted.internet.defer.Deferred
Overrides: component.BaseComponent.do_stop
(inherited documentation)

updatePorterDetails(self, path, username, password)

source code 

Provide a new set of porter login information, for when we're in slave mode and the porter changes. If we're currently connected, this won't disconnect - it'll just change the information so that next time we try and connect we'll use the new ones

do_start(self, *args, **kwargs)

source code 

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

Returns:
twisted.internet.defer.Deferred
Overrides: component.BaseComponent.do_start
(inherited documentation)

do_check(self)

source code 

Subclasses can implement me to run any checks before the component performs setup.

Messages can be added to the component state's 'messages' list key. Any error messages added will trigger the component going to sad an flumotion.common.errors.ComponentSetupError being raised; do_setup() will not be called.

In the event of a fatal problem that can't be expressed through an error message, this method should set the mood to sad and raise the error on its own.

self.config will be set before this is called.

Returns:
twisted.internet.defer.Deferred
Overrides: component.BaseComponent.do_check
(inherited documentation)

getLoadData(self)

source code 

Return a tuple (deltaadded, deltaremoved, bytes_transferred, current_clients, current_load) of our current bandwidth and user values. The deltas and current_load are NOT currently implemented here, we set them as zero.

authenticateKeycard(self, bouncerName, keycard)

source code 
Overrides: base.http.HTTPAuthentication.authenticateKeycard

cleanupKeycard(self, bouncerName, keycard)

source code 
Overrides: base.http.HTTPAuthentication.cleanupKeycard

clientDone(self, fd)

source code 
Overrides: base.http.HTTPAuthentication.clientDone

Class Variable Details [hide private]

__implemented__

Value:
<implementedBy flumotion.component.misc.httpfile.httpfile.HTTPFileStre\
amer>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x9370c2c>