]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/Filler.cc
Renamed squid.h to squid-old.h and config.h to squid.h
[thirdparty/squid.git] / src / mgr / Filler.cc
1 /*
2 * $Id$
3 *
4 * DEBUG: section 16 Cache Manager API
5 *
6 */
7
8 #include "squid.h"
9 #include "base/TextException.h"
10 #include "comm/Connection.h"
11 #include "mgr/Filler.h"
12 #include "mgr/Response.h"
13 #include "Store.h"
14
15
16 CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler);
17
18 Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn,
19 unsigned int aRequestId):
20 StoreToCommWriter(conn, anAction->createStoreEntry()),
21 action(anAction),
22 requestId(aRequestId)
23 {
24 debugs(16, 5, HERE << conn << " action: " << action);
25 }
26
27 void
28 Mgr::Filler::start()
29 {
30 debugs(16, 5, HERE);
31 Must(requestId != 0);
32 Must(action != NULL);
33
34 StoreToCommWriter::start();
35 action->run(entry, false);
36 }
37
38 void
39 Mgr::Filler::swanSong()
40 {
41 debugs(16, 5, HERE);
42 action->sendResponse(requestId);
43 StoreToCommWriter::swanSong();
44 }