XRootD
XrdClLocalFileTask.cc
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
3 // Author: Paul-Niklas Kramp <p.n.kramp@gsi.de>
4 //------------------------------------------------------------------------------
5 // XRootD is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // XRootD is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17 //------------------------------------------------------------------------------
19 
20 namespace XrdCl
21 {
23  {
24  this->st = st;
25  this->obj = obj;
26  this->hosts = hosts;
27  this->responsehandler = responsehandler;
28  }
29 
31 
32  void LocalFileTask::Run( void *arg )
33  {
34  if( responsehandler )
35  responsehandler->HandleResponseWithHosts( st, obj, hosts );
36  else{
37  delete st;
38  delete obj;
39  delete hosts;
40  }
41  delete this;
42  }
43 }
virtual void Run(void *arg)
The job logic.
LocalFileTask(XRootDStatus *st, AnyObject *obj, HostList *hosts, ResponseHandler *responsehandler)
Handle an async response.
virtual void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
std::vector< HostInfo > HostList