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 49 SNMP Interface */
10 
11 #ifndef SQUID_SNMPX_INQUIRER_H
12 #define SQUID_SNMPX_INQUIRER_H
13 
14 #include "comm/forward.h"
15 #include "ipc/Inquirer.h"
16 #include "snmp/forward.h"
17 #include "snmp/Pdu.h"
18 
19 class CommCloseCbParams;
20 
21 namespace Snmp
22 {
23 
26 class Inquirer: public Ipc::Inquirer
27 {
29 
30 public:
31  Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords);
32 
33 protected:
34  /* AsyncJob API */
35  virtual void start();
36  virtual bool doneAll() const;
37 
38  /* Ipc::Inquirer API */
39  virtual void cleanup();
40  virtual void handleException(const std::exception& e);
41  virtual void sendResponse();
42  virtual bool aggregate(Ipc::Response::Pointer aResponse);
43 
44 private:
45  void noteCommClosed(const CommCloseCbParams& params);
46 
47 private:
50 
53 };
54 
55 } // namespace Snmp
56 
57 #endif /* SQUID_SNMPX_INQUIRER_H */
58 
Inquirer(const Request &aRequest, const Ipc::StrandCoords &coords)
Definition: Inquirer.cc:24
Comm::ConnectionPointer conn
client connection descriptor
Definition: Inquirer.h:49
Definition: Pdu.h:23
virtual void start()
called by AsyncStart; do not call directly
Definition: Inquirer.cc:57
Pdu aggrPdu
aggregated pdu
Definition: Inquirer.h:48
std::vector< StrandCoord > StrandCoords
a collection of strand coordinates; the order, if any, is owner-dependent
Definition: StrandCoords.h:19
SNMP request.
Definition: Request.h:24
virtual bool aggregate(Ipc::Response::Pointer aResponse)
perform aggregating of responses and returns true if need to continue
Definition: Inquirer.cc:73
void noteCommClosed(const CommCloseCbParams &params)
called when the some external force closed our socket
Definition: Inquirer.cc:87
AsyncCall::Pointer closer
comm_close handler
Definition: Inquirer.h:52
AsyncCall::Pointer writer
comm_write callback
Definition: Inquirer.h:51
virtual void cleanup()
closes our copy of the client connection socket
Definition: Inquirer.cc:44
virtual void handleException(const std::exception &e)
do specific exception handling
Definition: Inquirer.cc:66
CBDATA_CLASS(Inquirer)
virtual bool doneAll() const
whether positive goal has been reached
Definition: Inquirer.cc:96
virtual void sendResponse()
send response to client
Definition: Inquirer.cc:102

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors