Loading...
Searching...
No Matches
XrdClResponseJob.hh
Go to the documentation of this file.
//------------------------------------------------------------------------------
// Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
// Author: Lukasz Janyst <ljanyst@cern.ch>
//------------------------------------------------------------------------------
// XRootD is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// XRootD is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//------------------------------------------------------------------------------
#ifndef __XRD_CL_RESPONSE_JOB_HH__
#define __XRD_CL_RESPONSE_JOB_HH__
#include "XrdCl/XrdClJobManager.hh"
#include "XrdCl/XrdClXRootDResponses.hh"
namespace XrdCl
{
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class ResponseJob: public Job
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
ResponseJob( ResponseHandler *handler,
XRootDStatus *status,
AnyObject *response,
HostList *hostList ):
pHandler( handler ), pStatus( status ), pResponse( response ),
pHostList( hostList )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual ~ResponseJob()
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual void Run( void *arg )
{
pHandler->HandleResponseWithHosts( pStatus, pResponse, pHostList );
delete this;
}
private:
ResponseHandler *pHandler;
XRootDStatus *pStatus;
AnyObject *pResponse;
HostList *pHostList;
};
}
#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:1127
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:1121