24 CalloutHandle::CalloutHandle(
const boost::shared_ptr<CalloutManager>& manager,
25 const boost::shared_ptr<LibraryManagerCollection>& lmcoll)
26 : lm_collection_(lmcoll), arguments_(), context_collection_(),
27 manager_(manager), server_hooks_(
ServerHooks::getServerHooks()),
28 next_step_(NEXT_STEP_CONTINUE) {
47 context_collection_.clear();
69 for (ElementCollection::const_iterator i = arguments_.begin();
70 i != arguments_.end(); ++i) {
71 names.push_back(i->first);
79 return (boost::make_shared<ParkingLotHandle>(server_hooks_.
getParkingLotPtr(manager_->getHookIndex())));
87 return (manager_->getLibraryHandle());
95 CalloutHandle::getContextForLibrary() {
96 int libindex = manager_->getLibraryIndex();
100 return (context_collection_[libindex]);
107 CalloutHandle::getContextForLibrary()
const {
108 int libindex = manager_->getLibraryIndex();
110 ContextCollection::const_iterator libcontext =
111 context_collection_.find(libindex);
112 if (libcontext == context_collection_.end()) {
113 isc_throw(NoSuchCalloutContext,
"unable to find callout context "
114 "associated with the current library index (" << libindex <<
119 return (libcontext->second);
128 vector<string> names;
131 for (ElementCollection::const_iterator i = elements.begin();
132 i != elements.end(); ++i) {
133 names.push_back(i->first);
146 int index = manager_->getHookIndex();
151 hook = server_hooks_.
getName(index);
163 : callout_handle_(callout_handle) {
164 if (!callout_handle_) {
176 ScopedCalloutHandleState::resetState() {
179 callout_handle_->deleteAllArguments();