Forwarder.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_FORWARDER_H
12 #define SQUID_MGR_FORWARDER_H
13 
14 #include "comm/forward.h"
15 #include "ipc/Forwarder.h"
16 #include "mgr/ActionParams.h"
17 
18 class CommCloseCbParams;
19 class HttpRequest;
20 class StoreEntry;
21 class ErrorState;
22 
23 namespace Mgr
24 {
25 
31 {
33 
34 public:
35  Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest* aRequest,
36  StoreEntry* anEntry);
37  virtual ~Forwarder();
38 
39 protected:
40  /* Ipc::Forwarder API */
41  virtual void cleanup();
42  virtual void handleError();
43  virtual void handleTimeout();
44  virtual void handleException(const std::exception& e);
45 
46 private:
47  void noteCommClosed(const CommCloseCbParams& params);
48  void sendError(ErrorState* error);
49 
50 private:
55 };
56 
57 } // namespace Mgr
58 
59 #endif /* SQUID_MGR_FORWARDER_H */
60 
virtual void handleTimeout()
Definition: Forwarder.cc:82
void error(char *format,...)
Cache Manager Action parameters extracted from the user request.
Definition: ActionParams.h:23
virtual void cleanup()
perform cleanup actions
Definition: Forwarder.cc:61
AsyncCall::Pointer closer
comm_close handler for the HTTP connection
Definition: Forwarder.h:54
HttpRequest * httpRequest
HTTP client request for detailing errors.
Definition: Forwarder.h:51
virtual void handleException(const std::exception &e)
terminate with an error
Definition: Forwarder.cc:89
virtual void handleError()
Definition: Forwarder.cc:74
virtual ~Forwarder()
Definition: Forwarder.cc:47
void noteCommClosed(const CommCloseCbParams &params)
called when the client socket gets closed by some external force
Definition: Forwarder.cc:98
void sendError(ErrorState *error)
send error page
Definition: Forwarder.cc:107
CBDATA_CLASS(Forwarder)
StoreEntry * entry
Store entry expecting the response.
Definition: Forwarder.h:52
Comm::ConnectionPointer conn
HTTP client connection descriptor.
Definition: Forwarder.h:53
Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest *aRequest, StoreEntry *anEntry)
Definition: Forwarder.cc:28

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors