Commit 31087cad authored by Grégory Wisniewski's avatar Grégory Wisniewski

Client handlers take dispatcher reference from app.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1621 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c2088712
......@@ -131,14 +131,12 @@ class Application(object):
self.mq_cache = MQ()
self.new_oid_list = []
self.last_oid = '\0' * 8
self.storage_event_handler = storage.StorageEventHandler(self, self.
dispatcher)
self.storage_event_handler = storage.StorageEventHandler(self)
self.storage_bootstrap_handler = storage.StorageBootstrapHandler(self)
self.storage_handler = storage.StorageAnswersHandler(self)
self.primary_handler = master.PrimaryAnswersHandler(self)
self.primary_bootstrap_handler = master.PrimaryBootstrapHandler(self)
self.notifications_handler = master.PrimaryNotificationsHandler(
self, self.dispatcher)
self.notifications_handler = master.PrimaryNotificationsHandler( self)
# Internal attribute distinct between thread
self.local_var = ThreadContext()
# Lock definition :
......
......@@ -21,9 +21,9 @@ from neo.protocol import ProtocolError
class BaseHandler(EventHandler):
"""Base class for client-side EventHandler implementations."""
def __init__(self, app, dispatcher):
def __init__(self, app):
super(BaseHandler, self).__init__(app)
self.dispatcher = dispatcher
self.dispatcher = app.dispatcher
def dispatch(self, conn, packet):
# Before calling superclass's dispatch method, lock the connection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment