summaryrefslogtreecommitdiff
path: root/repoze/bfg/events.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-08-29 18:48:48 +0000
committerChris McDonough <chrism@agendaless.com>2008-08-29 18:48:48 +0000
commitfaaebc304a29308a98b22d8fc56c500b018b6c90 (patch)
treea5e3430eecff3fa11ea7cee6c15dbfccaecaa08f /repoze/bfg/events.py
parent770ee43de26fbd04c27f32121d2a4a1138c93d82 (diff)
downloadpyramid-faaebc304a29308a98b22d8fc56c500b018b6c90.tar.gz
pyramid-faaebc304a29308a98b22d8fc56c500b018b6c90.tar.bz2
pyramid-faaebc304a29308a98b22d8fc56c500b018b6c90.zip
Rejigger and document wsgi app created event.
Diffstat (limited to 'repoze/bfg/events.py')
-rw-r--r--repoze/bfg/events.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/repoze/bfg/events.py b/repoze/bfg/events.py
index 3253f1380..b43fd5753 100644
--- a/repoze/bfg/events.py
+++ b/repoze/bfg/events.py
@@ -2,6 +2,7 @@ from zope.interface import implements
from repoze.bfg.interfaces import INewRequest
from repoze.bfg.interfaces import INewResponse
+from repoze.bfg.interfaces import IWSGIApplicationCreatedEvent
class NewRequest(object):
""" An instance of this class is emitted as an event whenever
@@ -21,3 +22,13 @@ class NewResponse(object):
implements(INewResponse)
def __init__(self, response):
self.response = response
+
+class WSGIApplicationCreatedEvent(object):
+ """ An instance of this class is emitted as an event whenever a
+ ``repoze.bfg`` application starts. The instance has an attribute,
+ ``app``, which is an instance of the ``repoze.bfg.router.Router``
+ class that will handle WSGI requests. This class implements the
+ ``repoze.bfg.interfaces.IWSGIApplicationCreatedEvent`` interface."""
+ implements(IWSGIApplicationCreatedEvent)
+ def __init__(self, app):
+ self.app = app