]>
Commit | Line | Data |
---|---|---|
8822ebee | 1 | /* |
77b1029d | 2 | * Copyright (C) 1996-2020 The Squid Software Foundation and contributors |
8822ebee | 3 | * |
bbc27441 AJ |
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. | |
8822ebee AR |
7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 16 Cache Manager API */ |
10 | ||
f7f3304a | 11 | #include "squid.h" |
8822ebee | 12 | #include "base/TextException.h" |
c3e8e4e9 | 13 | #include "comm/Connection.h" |
8822ebee AR |
14 | #include "mgr/Filler.h" |
15 | #include "mgr/Response.h" | |
16 | #include "Store.h" | |
17 | ||
8822ebee AR |
18 | CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler); |
19 | ||
c3e8e4e9 | 20 | Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn, |
8822ebee | 21 | unsigned int aRequestId): |
f53969cc SM |
22 | StoreToCommWriter(conn, anAction->createStoreEntry()), |
23 | action(anAction), | |
24 | requestId(aRequestId) | |
8822ebee | 25 | { |
c3e8e4e9 | 26 | debugs(16, 5, HERE << conn << " action: " << action); |
8822ebee AR |
27 | } |
28 | ||
29 | void | |
30 | Mgr::Filler::start() | |
31 | { | |
32 | debugs(16, 5, HERE); | |
33 | Must(requestId != 0); | |
34 | Must(action != NULL); | |
35 | ||
36 | StoreToCommWriter::start(); | |
37 | action->run(entry, false); | |
38 | } | |
39 | ||
40 | void | |
41 | Mgr::Filler::swanSong() | |
42 | { | |
43 | debugs(16, 5, HERE); | |
44 | action->sendResponse(requestId); | |
45 | StoreToCommWriter::swanSong(); | |
46 | } | |
f53969cc | 47 |