Package flumotion :: Package twisted :: Module rtsp :: Class RTSPResource
[show private | hide private]
[frames | no frames]

Class RTSPResource

Loggable --+
           |
Resource --+
           |
          RTSPResource

Known Subclasses:
ErrorResource

I am a base class for all RTSP Resource classes.
Method Summary
  getChild(self, path, request)
Retrieve a 'child' resource from me.
  getChildWithDefault(self, path, request)
Retrieve a static or dynamically generated child resource from me.
  noputChild(self, path, r)
  render_GET(self, request)
  render_start(self, request, method)
  render_startCSeqDate(self, request, method)
Set CSeq and Date on response to given request.
    Inherited from Resource
  __init__(self)
Initialize.
  delEntity(self, name)
  getChildForRequest(self, request)
  getDynamicEntity(self, name, request)
  getStaticEntity(self, name)
  listDynamicEntities(self, request)
  listDynamicNames(self)
  listEntities(self)
  listNames(self)
  listStaticEntities(self)
  listStaticNames(self)
  putChild(self, path, child)
Register a static child.
  reallyPutEntity(self, name, entity)
  render(self, request)
Render a given resource.
  render_HEAD(self, request)
Default handling of HEAD method.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Instance Variable Summary
tuple allowedMethods: a tuple of allowed methods that can be invoked on this resource.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Resource
Implements __implemented__ = <implementedBy twisted.web.resource.Re...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
InterfaceClass entityType = <InterfaceClass twisted.web.resource.IResou...
int isLeaf = 0                                                                     
NoneType server = None                                                                  

Method Details

getChild(self, path, request)

Retrieve a 'child' resource from me.

Implement this to create dynamic resource generation -- resources which are always available may be registered with self.putChild().

This will not be called if the class-level variable 'isLeaf' is set in your subclass; instead, the 'postpath' attribute of the request will be left as a list of the remaining path elements.

For example, the URL /foo/bar/baz will normally be:
 | site.resource.getChild('foo').getChild('bar').getChild('baz').
However, if the resource returned by 'bar' has isLeaf set to true, then the getChild call will never be made on it.
Parameters:
path - a string, describing the child
request - a twisted.web.server.Request specifying meta-information about the request that is being made for this child.
Overrides:
twisted.web.resource.Resource.getChild (inherited documentation)

getChildWithDefault(self, path, request)

Retrieve a static or dynamically generated child resource from me.

First checks if a resource was added manually by putChild, and then call getChild to check for dynamic resources. Only override if you want to affect behaviour of all child lookups, rather than just dynamic ones.

This will check to see if I have a pre-registered child resource of the given name, and call getChild if I do not.
Overrides:
twisted.web.resource.Resource.getChildWithDefault (inherited documentation)

render_startCSeqDate(self, request, method)

Set CSeq and Date on response to given request. This should be done even for errors.

Instance Variable Details

allowedMethods

a tuple of allowed methods that can be invoked on this resource.
Type:
tuple
Value:
['OPTIONS']                                                            

Class Variable Details

logCategory

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

Generated by Epydoc 2.1 on Fri May 18 09:35:53 2007 http://epydoc.sf.net