Interface for (HTTP) applications, plus process controls.
Servers and gateways should not instantiate Request objects directly.
Instead, they should ask an Engine object for a request via the
Engine.request method.
Blocking is completely optional! The Engine's blocking, signal and
interrupt handling, privilege dropping, and autoreload features are not a
good idea when driving CherryPy applications from another deployment tool
(but an Engine is a great deployment tool itself). By calling
start(blocking=False), you avoid blocking and interrupt- handling issues.
By setting Engine.SIGHUP and Engine.SIGTERM to None, you can completely
disable the signal handling (and therefore disable autoreloads triggered
by SIGHUP). Set Engine.autoreload_on to False to disable autoreload
entirely.
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature |
source code
|
|
|
start(self,
blocking=True)
Start the application engine. |
source code
|
|
|
block(self)
Block forever (wait for stop(), KeyboardInterrupt or
SystemExit). |
source code
|
|
|
reexec(self)
Re-execute the current process. |
source code
|
|
|
autoreload(self)
Reload the process if registered files have been modified. |
source code
|
|
|
|
|
restart(self)
Restart the application engine (does not block). |
source code
|
|
|
wait(self)
Block the caller until ready to receive requests (or error). |
source code
|
|
|
request(self,
local_host,
remote_host,
scheme=' http ' ,
server_protocol=' HTTP/1.1 ' )
Obtain and return an HTTP Request object. |
source code
|
|
|
|
|
|
|
start_with_callback(self,
func,
args=None,
kwargs=None)
Start the given func in a new thread, then start self and
block. |
source code
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|