Inquirer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 16 Cache Manager API */
10 
11 #ifndef SQUID_SRC_MGR_INQUIRER_H
12 #define SQUID_SRC_MGR_INQUIRER_H
13 
14 #include "comm/forward.h"
15 #include "ipc/Inquirer.h"
16 #include "mgr/Action.h"
17 
18 class CommIoCbParams;
19 class CommCloseCbParams;
20 
21 namespace Mgr
22 {
23 
26 class Inquirer: public Ipc::Inquirer
27 {
29 
30 public:
31  Inquirer(Action::Pointer anAction, const Request &aCause,
32  const Ipc::StrandCoords &coords);
33 
34 protected:
35  /* AsyncJob API */
36  void start() override;
37  bool doneAll() const override;
38 
39  /* Ipc::Inquirer API */
40  void cleanup() override;
41  void sendResponse() override;
42  bool aggregate(Ipc::Response::Pointer aResponse) override;
43 
44 private:
45  void noteWroteHeader(const CommIoCbParams& params);
46  void noteCommClosed(const CommCloseCbParams& params);
47  void removeCloseHandler();
49  const QueryParams& aParams);
50 private:
51  Action::Pointer aggrAction; //< action to aggregate
52 
54 
57 };
58 
59 } // namespace Mgr
60 
61 #endif /* SQUID_SRC_MGR_INQUIRER_H */
62 
void noteWroteHeader(const CommIoCbParams &params)
called when we wrote the response header
Definition: Inquirer.cc:103
Inquirer(Action::Pointer anAction, const Request &aCause, const Ipc::StrandCoords &coords)
Definition: Inquirer.cc:35
void sendResponse() override
send response to client
Definition: Inquirer.cc:137
CBDATA_CHILD(Inquirer)
void noteCommClosed(const CommCloseCbParams &params)
called when the HTTP client or some external force closed our socket
Definition: Inquirer.cc:116
Action::Pointer aggrAction
Definition: Inquirer.h:51
Ipc::StrandCoords applyQueryParams(const Ipc::StrandCoords &aStrands, const QueryParams &aParams)
Definition: Inquirer.cc:153
AsyncCall::Pointer writer
comm_write callback
Definition: Inquirer.h:55
bool doneAll() const override
whether positive goal has been reached
Definition: Inquirer.cc:147
cache manager request
Definition: Request.h:23
void cleanup() override
closes our copy of the client HTTP connection socket
Definition: Inquirer.cc:52
bool aggregate(Ipc::Response::Pointer aResponse) override
perform aggregating of responses and returns true if need to continue
Definition: Inquirer.cc:128
void removeCloseHandler()
Definition: Inquirer.cc:61
void start() override
called by AsyncStart; do not call directly
Definition: Inquirer.cc:70
std::vector< StrandCoord > StrandCoords
a collection of strand coordinates; the order, if any, is owner-dependent
Definition: StrandCoords.h:19
Comm::ConnectionPointer conn
HTTP client socket descriptor.
Definition: Inquirer.h:53
AsyncCall::Pointer closer
comm_close handler
Definition: Inquirer.h:56
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous