returns the handler
966104
def handler(self):
        """"""
        if self._handler is None:
            passman = request.HTTPPasswordMgrWithDefaultRealm()
            passman.add_password(None,
                                 self._parsed_org_url,
                                 self._login_username,
                                 self.password)
            self._handler = request.HTTPBasicAuthHandler(passman)
        return self._handler
1247128
def get_message_handler(self, message_handlers):
        
        encoder = self.options.encoder
        try:
            return message_handlers[encoder]
        except KeyError:
            raise NotImplementedError('No RequestHandler defined for given encoder (%s).' % encoder)
603013
protected function getHandler() : HandlerStack
    {
        $stack = HandlerStack::create();

        $stack->push(
            Middleware::mapResponse(function (ResponseInterface $response) {
                $handler = $this->getResponseHandler();

                return new $handler($response);
            }),
            'bitcoind_response'
        );

        return $stack;
    }
94861
function Handler() {
    if (this.constructor === Handler) {
        throw new Error("Can't instantiate abstract class!");
    }

    /**
     * @var {Object}
     * @protected
     */
    this.__inspector;

    /**
     * @var {Object}
     * @protected
     */
    this.__run;

    /**
     * @var {Object}
     * @protected
     */
    this.__request = null;

    /**
     * @var {Object}
     * @protected
     */
    this.__response = null;
}
356925
def (self, method):
        
        def _handler(callback, schema=None):
            """
            _handler
            """
            # reentrant default is False [POST, DELETE, PUT]
            reentrant = False
            if method == "get":
                reentrant = True

            self.handlers.append({
                "method": method,
                "callback": callback,
                "schema": schema,
                "reentrant": reentrant
            })
            return self

        return _handler
328938
def handle(self, handler):
        
        with self._hlock:
            self._handler_list.append(handler)
        return self
1294130
def _handle_dumps(self, handler, **kwargs):
    

    return handler.dumps(self.__class__, to_dict(self), **kwargs)
779039
function(event, handler) {
    return events.on({
      listeners: this._listeners,
      event: event,
      handler: handler
    });
  }
384082
def get_logger(name):
    
    logger = logging.getLogger(name)
    logger.addHandler(logging.NullHandler())
    return logger
722719
function handler() {
        try {
          if (this.readyState === this.DONE) {

            var response = _buildResponse(this, options.fullResponse);

            // Resolve or reject promise given the response status.
            // HTTP status of 2xx is considered a success.
            if (this.status >= 200 && this.status < 300) {

              if (successCallback) {
                Logger.warnCallbackDeprecation();
                successCallback(response);
              }
              resolve(response);

            } else {
              errorHandler(response);
            }
          }
        } catch (exception) {
          // Do nothing, will be handled by ontimeout.
        }
      }
1120471
def create_handler(target: str):
    """"""
    if target == 'stderr':
        return logging.StreamHandler(sys.stderr)
    elif target == 'stdout':
        return logging.StreamHandler(sys.stdout)
    else:
        return logging.handlers.WatchedFileHandler(filename=target)
269715
function(name){
      var config = this._wreqrHandlers[name];

      if (!config){
        throw new Error("Handler not found for '" + name + "'");
      }

      return function(){
        var args = Array.prototype.slice.apply(arguments);
        return config.callback.apply(config.context, args);
      };
    }
1274424
def http_handler(name, logname, host, url, method="GET"):
    

    return wrap_log_handler(logging.handlers.HTTPHandler(
        host, url, method=method))
715900
def get_handler(self, request):
        
        try:
            f = self._json_rpc_methods[request.method]

        except (AttributeError, KeyError):  # pragma no coverage
            raise RPCMethodError("Received invalid method '{}'".format(request.method))

        return f
1109535
public function getHandler()
    {
        if (!$this->handler) {
            return $this->getDefaultHandler();
        }

        if (is_callable($this->handler)) {
            $this->handler = call_user_func($this->handler);
        }

        return $this->handler;
    }
243432
def __handler(self, connection, event):
        
        try:
            # Find local handler
            method = getattr(self, "on_{0}".format(event.type))
        except AttributeError:
            pass
        else:
            try:
                # Call it
                return method(connection, event)
            except Exception as ex:
                logging.exception("Error calling handler: %s", ex)
738320
def handle(self):
        
        self.raw_requestline = self.rfile.readline()
        if not self.parse_request(): # An error code has been sent, just exit
            return

        # next line is where we'd have expect a configuration key somehow
        handler = self.WebSocketWSGIHandler(
            self.rfile, self.wfile, self.get_stderr(), self.get_environ()
        )
        handler.request_handler = self      # backpointer for logging
        handler.run(self.server.get_app())