// Handle calls the next chain if any
550453
func (r *FlatChain) Handle(res http.ResponseWriter, req *http.Request, co Collector) {
	c := NewContextWith(res, req, r.log)
	c.Copy(co)
	r.HandleContext(c)
}
130961
func (c *converter) Handle(_ <-chan struct{}) error {
	results, err := c.machine.Jobs()
	if err != nil {
		return errors.Annotate(err, "can't get jobs for machine")
	}
	if !multiwatcher.AnyJobNeedsState(results.Jobs...) {
		return nil
	}

	return &util.FatalError{"bounce agent to pick up new jobs"}
}
182364
func (h retryStrategyHandler) Handle(_ <-chan struct{}) error {
	newRetryStrategy, err := h.config.Facade.RetryStrategy(h.config.AgentTag)
	if err != nil {
		return errors.Trace(err)
	}
	if newRetryStrategy != h.config.RetryStrategy {
		return errors.Errorf("bouncing retrystrategy worker to get new values")
	}
	return nil
}
1277614
func (h *handler) Handle(req *Request) (interface{}, error) {
	switch req.Method {
	case "chat":
		return nil, h.handleChat(req)
	case "query":
		return h.handleQuery(req)
	}
	return nil, errInvalidMethod
}
314257
func (b *Bot) Handle(cmd string, handler Handler) {
	b.handlers[cmd] = append(b.handlers[cmd], handler)
}
502378
func (robot *Robot) Handle(handlers ...interface{}) {
	for _, h := range handlers {
		nh, err := NewHandler(h)
		if err != nil {
			Logger.Fatal(err)
			panic(err)
		}

		robot.handlers = append(robot.handlers, nh)
	}
}
253296
func (h *Handler) Handle(err error) {
	var interfaces []raven.Interface

	// Get HTTP request (if any)
	if req, ok := httperr.HTTPRequest(err); ok {
		interfaces = append(interfaces, raven.NewHttp(req))
	}

	packet := raven.NewPacketWithExtra(
		err.Error(),
		keyvals.ToMap(emperror.Context(err)),
		append(
			interfaces,
			raven.NewException(
				err,
				raven.GetOrNewStacktrace(emperror.ExposeStackTrace(err), 1, 3, h.client.IncludePaths()),
			),
		)...,
	)

	eventID, ch := h.client.Capture(packet, nil)

	if h.sendSynchronously && eventID != "" {
		<-ch
	}
}
886353
func (m *Middleware) Handle(ctx context.Context, req *transport.Request, w transport.ResponseWriter, h transport.UnaryHandler) error {
	call := m.graph.begin(ctx, transport.Unary, _directionInbound, req)
	wrappedWriter := newWriter(w)
	err := h.Handle(ctx, req, wrappedWriter)
	call.EndWithAppError(err, wrappedWriter.isApplicationError)
	wrappedWriter.free()
	return err
}
1249796
func (s *Server) Handle(c *Connection) {
	s.mutex.Lock()
	defer s.mutex.Unlock()

	s.messages = append(s.messages, "")

	s.readHello(c)
	s.readSender(c)
	s.readRecipients(c)
	s.readData(c)

	c.conn.Close()
}
473400
func (fn GetOrdersForItemHandlerFunc) Handle(params GetOrdersForItemParams, principal *models.Principal) middleware.Responder {
	return fn(params, principal)
}
45904
func (s *Server) Handle(route string, method string, httpHandler http.Handler) {
	s.addRoute(route, method, httpHandler)
}
128720
func (g *routeGroup) Handle(method string, path string, h ...Handler) {
	g.handle(method, path, h)
}
515443
func (n *Node) handle() {
	resp := &Response{}
	for n.state == stateReady {
		err := n.codec.DecodeHead(&resp.Head)
		if err != nil {
			if n.state != stateShutdown {
				n.logger.Error("client > failed to decode head: ", err)
				n.Close()
			}
			break
		}

		if resp.Head.ID == 0 {
			n.heartbeat()
			continue
		}

		c := n.calls.Find(resp.Head.ID)
		if c == nil { // unknown response or request is timeout.
			n.codec.DiscardResult()
			n.logger.Error("client > unknown request: ", resp.Head.ID)
			continue
		}

		resp.Result.Value = c.reply
		err = n.codec.DecodeResult(&resp.Result)
		if err != nil {
			n.logger.Error("client > failed to decode result: ", err)
		} else if resp.Result.Error != nil {
			err = resp.Result.Error
		}
		c.finish(err)
	}

	n.calls.Clear(func(c *Call) {
		c.finish(ErrNodeShutdown)
	})
}
595523
func (fn OrderGetHandlerFunc) Handle(params OrderGetParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
1204292
func (eh guildCreateEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*GuildCreate); ok {
		eh(s, t)
	}
}
1230227
func (r *Router) Handle(path string, handler http.Handler) *Route {
	return r.NewRoute().Path(path).Handler(handler)
}
1011344
func (c Chain) Handler(h http.Handler) http.Handler {
	if h == nil {
		h = http.DefaultServeMux
	}

	for i := len(c.mw) - 1; i >= 0; i-- {
		h = c.mw[i](h)
	}
	return h
}