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
22
#include "
XrdCl/XrdClJobManager.hh
"
23
#include "
XrdCl/XrdClXRootDResponses.hh
"
24
25
namespace
XrdCl
26
{
27
//----------------------------------------------------------------------------
29
//----------------------------------------------------------------------------
30
class
ResponseJob
:
public
Job
31
{
32
public
:
33
//------------------------------------------------------------------------
35
//------------------------------------------------------------------------
36
ResponseJob
(
ResponseHandler
*handler,
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
{
58
pHandler->
HandleResponseWithHosts
( pStatus, pResponse, pHostList );
59
delete
this
;
60
}
61
62
private
:
63
ResponseHandler
*pHandler;
64
XRootDStatus
*pStatus;
65
AnyObject
*pResponse;
66
HostList
*pHostList;
67
};
68
}
69
70
#endif
// __XRD_CL_RESPONSE_JOB_HH__
XrdClJobManager.hh
XrdClXRootDResponses.hh
XrdCl::AnyObject
Definition
XrdClAnyObject.hh:33
XrdCl::Job
Interface for a job to be run by the job manager.
Definition
XrdClJobManager.hh:34
XrdCl::ResponseHandler
Handle an async response.
Definition
XrdClXRootDResponses.hh:1126
XrdCl::ResponseHandler::HandleResponseWithHosts
virtual void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Definition
XrdClXRootDResponses.hh:1139
XrdCl::ResponseJob
Call the user callback.
Definition
XrdClResponseJob.hh:31
XrdCl::ResponseJob::ResponseJob
ResponseJob(ResponseHandler *handler, XRootDStatus *status, AnyObject *response, HostList *hostList)
Constructor.
Definition
XrdClResponseJob.hh:36
XrdCl::ResponseJob::Run
virtual void Run(void *arg)
Run the user handler.
Definition
XrdClResponseJob.hh:56
XrdCl::ResponseJob::~ResponseJob
virtual ~ResponseJob()
Destructor.
Definition
XrdClResponseJob.hh:48
XrdCl::XRootDStatus
Request status.
Definition
XrdClXRootDResponses.hh:219
XrdCl
Definition
XrdClAction.hh:34
XrdCl::HostList
std::vector< HostInfo > HostList
Definition
XrdClXRootDResponses.hh:1120
XrdCl
XrdClResponseJob.hh
Generated by
1.9.8