Package cherrypy :: Class _Serving
[hide private]
[frames] | no frames]

Class _Serving

source code

   object --+    
            |    
thread._local --+
                |
               _Serving

An interface for registering request and response objects.
    
    Rather than have a separate "thread local" object for the request and
    the response, this class works as a single threadlocal container for
    both objects (and any others which developers wish to define). In this
    way, we can easily dump those objects when we stop/start a new HTTP
    conversation, yet still refer to them as module-level globals in a
    thread-safe way.
    

request [= <cherrypy._cprequest.Request object at 0x406a580c>]:
    The request object for the current thread. In the main thread,
    and any threads which are not receiving HTTP requests, this is None.

response [= <cherrypy._cprequest.Response object at 0x406a584c>]:
    The response object for the current thread. In the main thread,
    and any threads which are not receiving HTTP requests, this is None.



Nested Classes [hide private]
  __metaclass__
Metaclass for declaring docstrings for class attributes.
Instance Methods [hide private]
 
load(self, request, response) source code
 
clear(self)
Remove all attributes of self.
source code

Inherited from thread._local: __delattr__, __getattribute__, __new__, __setattr__

Inherited from object: __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __str__

Class Variables [hide private]
  request = _cprequest.Request(_http.Host("localhost", 80), _htt...
  request__doc = ...
  response = _cprequest.Response()
  response__doc = ...
Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

request

Value:
_cprequest.Request(_http.Host("localhost", 80), _http.Host("localhost"\
, 1111))

request__doc

Value:
"""
    The request object for the current thread. In the main thread,
    and any threads which are not receiving HTTP requests, this is Non\
e."""

response__doc

Value:
"""
    The response object for the current thread. In the main thread,
    and any threads which are not receiving HTTP requests, this is Non\
e."""