xrootd
Loading...
Searching...
No Matches
XrdClResponseJob.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
3// Author: Lukasz Janyst <ljanyst@cern.ch>
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//------------------------------------------------------------------------------
18
19#ifndef __XRD_CL_RESPONSE_JOB_HH__
20#define __XRD_CL_RESPONSE_JOB_HH__
21
24
25namespace XrdCl
26{
27 //----------------------------------------------------------------------------
29 //----------------------------------------------------------------------------
30 class ResponseJob: public Job
31 {
32 public:
33 //------------------------------------------------------------------------
35 //------------------------------------------------------------------------
37 XRootDStatus *status,
38 AnyObject *response,
39 HostList *hostList ):
40 pHandler( handler ), pStatus( status ), pResponse( response ),
41 pHostList( hostList )
42 {
43 }
44
45 //------------------------------------------------------------------------
47 //------------------------------------------------------------------------
48 virtual ~ResponseJob()
49 {
50 }
51
52
53 //------------------------------------------------------------------------
55 //------------------------------------------------------------------------
56 virtual void Run( void *arg )
57 {
59 delete this;
60 }
61
62 private:
67 };
68}
69
70#endif // __XRD_CL_RESPONSE_JOB_HH__
Definition XrdClAnyObject.hh:33
Interface for a job to be run by the job manager.
Definition XrdClJobManager.hh:34
Handle an async response.
Definition XrdClXRootDResponses.hh:1126
virtual void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Definition XrdClXRootDResponses.hh:1139
Call the user callback.
Definition XrdClResponseJob.hh:31
ResponseJob(ResponseHandler *handler, XRootDStatus *status, AnyObject *response, HostList *hostList)
Constructor.
Definition XrdClResponseJob.hh:36
ResponseHandler * pHandler
Definition XrdClResponseJob.hh:63
HostList * pHostList
Definition XrdClResponseJob.hh:66
virtual void Run(void *arg)
Run the user handler.
Definition XrdClResponseJob.hh:56
virtual ~ResponseJob()
Destructor.
Definition XrdClResponseJob.hh:48
XRootDStatus * pStatus
Definition XrdClResponseJob.hh:64
AnyObject * pResponse
Definition XrdClResponseJob.hh:65
Request status.
Definition XrdClXRootDResponses.hh:219
Definition XrdClAction.hh:34
std::vector< HostInfo > HostList
Definition XrdClXRootDResponses.hh:1120