def _passive_handler(store, **kwargs):
 def wrapper(cls):
  funcs = ['on_request', 'on_inject_request', 'on_response', 'on_inject_response']
  for func in funcs:
   f = _passive_handler_func(getattr(cls, func))
   setattr(cls, func, f)
  return handler(store, passive=True, **kwargs)(cls)
 return wrapper

def _passive_handler ( store , ** kwargs ) : def wrapper ( cls ) : funcs = [ 'on_request' , 'on_inject_request' , 'on_response' , 'on_inject_response' ] for func in funcs : f = _passive_handler_func ( getattr ( cls , func ) ) setattr ( cls , func , f ) return handler ( store , passive = True , ** kwargs ) ( cls ) return wrapper
decorator for setting up a passive handler .