class WSGIResource: (source)
Constructor: WSGIResource(reactor, threadpool, application)
Implements interfaces: twisted.web.resource.IResource
An IResource
implementation which delegates responsibility for all resources hierarchically inferior to it to a WSGI application.
The environ argument passed to the application, includes the REMOTE_PORT key to complement the REMOTE_ADDR key.
Method | __init__ |
Undocumented |
Method | get |
Reject attempts to retrieve a child resource. All path segments beyond the one which refers to this resource are handled by the WSGI application object. |
Method | put |
Reject attempts to add a child resource to this resource. The WSGI application object handles all path segments beneath this resource, so IResource children can never be found. |
Method | render |
Turn the request into the appropriate environ dict suitable to be passed to the WSGI application object and then pass it on. |
Class Variable | is |
Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource. |
Instance Variable | _application |
The WSGI application object. |
Instance Variable | _reactor |
An IReactorThreads provider which will be passed on to _WSGIResponse to schedule calls in the I/O thread. |
Instance Variable | _threadpool |
A ThreadPool which will be passed on to _WSGIResponse to run the WSGI application object. |
Reject attempts to retrieve a child resource. All path segments beyond the one which refers to this resource are handled by the WSGI application object.
Reject attempts to add a child resource to this resource. The WSGI application object handles all path segments beneath this resource, so IResource
children can never be found.
Turn the request into the appropriate environ dict suitable to be passed to the WSGI application object and then pass it on.
The WSGI application object is given almost complete control of the rendering process. NOT_DONE_YET will always be returned in order and response completion will be dictated by the application object, as will the status, headers, and the response body.
Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.
An IReactorThreads
provider which will be passed on to _WSGIResponse
to schedule calls in the I/O thread.