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