Package flumotion :: Package component :: Package common :: Package streamer :: Module resources :: Class HTTPStreamingResource
[hide private]

Class HTTPStreamingResource

source code

twisted.web.resource.Resource --+
                                |
      extern.log.log.Loggable --+
                                |
                               HTTPStreamingResource
Known Subclasses:

Nested Classes [hide private]

Inherited from twisted.web.resource.Resource: entityType

Instance Methods [hide private]
 
__init__(self, streamer, httpauth)
Initialize.
source code
 
removeAllClients(self) source code
 
setRoot(self, path) source code
 
setLogFilter(self, logfilter) source code
 
rotateLogs(self)
Close the logfile, then reopen using the previous logfilename
source code
 
logWrite(self, request, bytes_sent, time_connected) source code
 
setUserLimit(self, limit) source code
 
setBandwidthLimit(self, limit) source code
 
setRedirectionOnLimits(self, url) source code
 
isReady(self) source code
 
getMaxAllowedClients(self, maxclients)
maximum number of allowed clients based on soft limit for number of open file descriptors and fd reservation.
source code
 
reachedServerLimits(self)
Check whether or not the server reached the limit of concurrent client
source code
dict
_getExtraLogArgs(self, request)
Extra arguments for logging.
source code
 
_setRequestHeaders(self, request) source code
 
_addClient(self, id, request=None)
Add a request, so it can be used for statistics.
source code
 
_removeClient(self, id)
Delete a request from the list
source code
 
_logRequestFromIP(self, ip)
Returns whether we want to log a request from this IP; allows us to filter requests from automated monitoring systems.
source code
 
_handleNotReady(self, request) source code
 
_handleServerFull(self, request) source code

Inherited from twisted.web.resource.Resource: __providedBy__, __provides__, delEntity, getChild, getChildForRequest, getChildWithDefault, getDynamicEntity, getStaticEntity, listDynamicEntities, listDynamicNames, listEntities, listNames, listStaticEntities, listStaticNames, putChild, reallyPutEntity, render, render_HEAD

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

Class Variables [hide private]
  HTTP_NAME = 'FlumotionHTTPServer'
  HTTP_SERVER = 'FlumotionHTTPServer/0.10.0'
  __reserve_fds__ = 50
  logCategory = 'httpstreamer'
Implementors can provide a category to log their messages under.
  isLeaf = True

Inherited from twisted.web.resource.Resource: __implemented__, server

Method Details [hide private]

__init__(self, streamer, httpauth)
(Constructor)

source code 

Initialize.

Parameters:
Overrides: twisted.web.resource.Resource.__init__

getMaxAllowedClients(self, maxclients)

source code 

maximum number of allowed clients based on soft limit for number of open file descriptors and fd reservation. Increases soft limit to hard limit if possible.

_getExtraLogArgs(self, request)

source code 

Extra arguments for logging. Should be overriden by subclasses that provide extra arguments for logging

Returns: dict
A dictionary with the extra arguments

_addClient(self, id, request=None)

source code 

Add a request, so it can be used for statistics.

Parameters:
  • id - the of the client (fd or session id)
  • request (int)

_removeClient(self, id)

source code 

Delete a request from the list

Parameters:
  • request (int) - the id of the client