Adds the extra handler (defined by the user)

        :param handlers: a list of :py:class:`tornado.web.RequestHandler` instances.
        :return:
486019
def _add_extra_handlers(self, handlers):
        
        extra_handlers = [(h[0], h[1], {"microservice": self}) for h in self.extra_handlers]
        handlers.extend(extra_handlers)
953580
def user_to_request(handler):
    ''''''
    @wraps(handler)
    async def decorator(*args):
        request = _get_request(args)
        request[cfg.REQUEST_USER_KEY] = await get_cur_user(request)
        return await handler(*args)
    return decorator
970380
public synchronized static void addHandler(Handler handler) {
      java.util.logging.Logger root = java.util.logging.LogManager.getLogManager().getLogger(StringUtils.EMPTY);
      root.addHandler(handler);
   }
1364300
def u2handlers(self):
        
        handlers = []
        handlers.append(u2.ProxyHandler(self.proxy))
        return handlers
731968
protected void addServerEventHandlers() {
		Map<Object, Class<?>> handlers =  getServerEventHandlers();
		Set<Entry<Object, Class<?>>> entries = handlers.entrySet();
		for(Entry<Object, Class<?>> entry : entries) {
			SFSEventType type = SFSEventType.valueOf(
					entry.getKey().toString());
			ServerEventHandler handler = createServerEventHandler(
					type, entry.getValue());
			addEventHandler(type, handler);
		}
	}
1357881
def _create_handler(self, config):
        
        if config is None:
            raise ValueError('No handler config to create handler from.')

        if 'name' not in config:
            raise ValueError('Handler name is required.')

        handler_name = config['name']
        # try to create handler
        module_name = handler_name.rsplit('.', 1)[0]
        class_name = handler_name.rsplit('.', 1)[-1]
        module = import_module(module_name)
        handler_class = getattr(module, class_name)
        instance = handler_class(**config)

        return instance
563747
def get_additional_handlers():
    
    global _additional_handlers
    if not isinstance(_additional_handlers, list):
        handlers = []
        for name in config.ADDITIONAL_HANDLERS:
            module_name, function_name = name.rsplit('.', 1)
            function = getattr(import_module(module_name), function_name)
            handlers.append(function)
        _additional_handlers = handlers
    return _additional_handlers
1263122
def handlers(self):
        """"""
        used = []
        for base_url, mapping in self.routes.items():
            for url, methods in mapping.items():
                for method, versions in methods.items():
                    for version, handler in versions.items():
                        if not handler in used:
                            used.append(handler)
                            yield handler
820302
def _attach_handler_events(self, handler, events=None):
        
        if not events:
            events = self
        for name in events:
            meth = getattr(handler, name, None)
            if meth:
                self.events[name] += meth
372016
def registerAllHandlers(self, handlerDict):
        '''
        
        '''
        self.handlers.update(handlerDict)
        if hasattr(handlerDict, 'keys'):
            self.scheduler.register(handlerDict.keys(), self)
        else:
            self.scheduler.register(tuple(h[0] for h in handlerDict), self)
        self._setDaemon()
1003604
def get_request_handler(self):
        
        assert self.request_handler is not None, \
            'Please define a request_handler ' \
            ' for Endpoint: %s' % self.__class__.__name__

        return self.request_handler(self, **self.get_request_handler_params())
982166
def u2handlers(self):
    
    # Start with the default set of handlers.
    return_handlers = suds.transport.http.HttpTransport.u2handlers(self)
    return_handlers.extend(self.handlers)

    return return_handlers
181399
def set_handler(self, handler):
        
        if self._handler:
            raise Exception('Handler was already set')
        if handler:
            self._handler = async_task(handler, loop=self._loop)
1352625
def add_event_handler(self, action):
        
        if action.uuid in self.actions:
            logger.info("Already existing event handler: %s", action)
            return

        self.actions[action.uuid] = action
        self.nb_event_handlers += 1
1185769
def add_handler(self, func, type='all'):
        
        if not callable(func):
            raise ValueError("{} is not callable".format(func))

        self._handlers[type].append(
            (func, len(signature(func).parameters.keys()))
        )
63985
def _add_handler(logger, handler=None, loglevel=None):
    
    handler.setLevel(loglevel or DEFAULT_LOGLEVEL)
    if handler.level <= logging.DEBUG:
        _fmt = '%(asctime)s| %(levelname)-4.3s|%(threadName)10.9s/' \
               '%(lineno)04d@%(module)-10.9s| %(message)s'
        handler.setFormatter(logging.Formatter(_fmt))
    else:
        handler.setFormatter(logging.Formatter(
            '%(asctime)s| %(levelname)-8s| %(message)s'
        ))
    logger.addHandler(handler)
914544
def call_extra(self, methods, kwargs):
        
        old = list(self._nonwrappers), list(self._wrappers)
        for method in methods:
            opts = dict(hookwrapper=False, trylast=False, tryfirst=False)
            hookimpl = HookImpl(None, "<temp>", method, opts)
            self._add_hookimpl(hookimpl)
        try:
            return self(**kwargs)
        finally:
            self._nonwrappers, self._wrappers = old