Inquirer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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_MGR_INQUIRER_H
12 #define SQUID_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  virtual void start();
37  virtual bool doneAll() const;
38 
39  /* Ipc::Inquirer API */
40  virtual void cleanup();
41  virtual void sendResponse();
42  virtual bool aggregate(Ipc::Response::Pointer aResponse);
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_MGR_INQUIRER_H */
62 
cache manager request
Definition: Request.h:22
AsyncCall::Pointer writer
comm_write callback
Definition: Inquirer.h:55
virtual void start()
called by AsyncStart; do not call directly
Definition: Inquirer.cc:68
Comm::ConnectionPointer conn
HTTP client socket descriptor.
Definition: Inquirer.h:53
virtual bool doneAll() const
whether positive goal has been reached
Definition: Inquirer.cc:137
CBDATA_CLASS(Inquirer)
AsyncCall::Pointer closer
comm_close handler
Definition: Inquirer.h:56
Ipc::StrandCoords applyQueryParams(const Ipc::StrandCoords &aStrands, const QueryParams &aParams)
Definition: Inquirer.cc:143
void noteCommClosed(const CommCloseCbParams &params)
called when the HTTP client or some external force closed our socket
Definition: Inquirer.cc:109
Inquirer(Action::Pointer anAction, const Request &aCause, const Ipc::StrandCoords &coords)
Definition: Inquirer.cc:33
std::vector< StrandCoord > StrandCoords
a collection of strand coordinates; the order, if any, is owner-dependent
Definition: StrandCoords.h:19
Action::Pointer aggrAction
Definition: Inquirer.h:51
void removeCloseHandler()
Definition: Inquirer.cc:59
virtual void sendResponse()
send response to client
Definition: Inquirer.cc:127
void noteWroteHeader(const CommIoCbParams &params)
called when we wrote the response header
Definition: Inquirer.cc:96
virtual void cleanup()
closes our copy of the client HTTP connection socket
Definition: Inquirer.cc:50
virtual bool aggregate(Ipc::Response::Pointer aResponse)
perform aggregating of responses and returns true if need to continue
Definition: Inquirer.cc:118

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors