Loading...
Searching...
No Matches
XrdClOperationHandlers.hh
Go to the documentation of this file.
//------------------------------------------------------------------------------
// Copyright (c) 2011-2017 by European Organization for Nuclear Research (CERN)
// Author: Krzysztof Jamrog <krzysztof.piotr.jamrog@cern.ch>,
// Michal Simon <michal.simon@cern.ch>
//------------------------------------------------------------------------------
// This file is part of the XRootD software suite.
//
// 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/>.
//
// In applying this licence, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//------------------------------------------------------------------------------
#ifndef __XRD_CL_OPERATION_HANDLERS_HH__
#define __XRD_CL_OPERATION_HANDLERS_HH__
#include "XrdCl/XrdClFile.hh"
#include "XrdCl/XrdClCtx.hh"
#include<functional>
#include<future>
#include <memory>
namespace XrdCl
{
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class UnpackXAttrStatus : public ResponseHandler
{
public:
UnpackXAttrStatus( ResponseHandler *handler ) : handler( handler )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response )
{
// status maybe error for old servers not supporting xattrs
if( !status->IsOK() )
{
handler->HandleResponse( status, nullptr );
return;
}
std::vector<XAttrStatus> *bulk = nullptr;
response->Get( bulk );
if (status && bulk && !bulk->empty()) {
*status = bulk->front().status;
}
handler->HandleResponse( status, nullptr );
delete response;
}
private:
ResponseHandler *handler;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class UnpackXAttr : public ResponseHandler
{
public:
UnpackXAttr( ResponseHandler *handler ) : handler( handler )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response )
{
// status is always OK for bulk response
std::vector<XAttr> *bulk = nullptr;
response->Get( bulk );
if (bulk && !bulk->empty()) {
if (status)
*status = bulk->front().status;
std::string *rsp = new std::string(std::move(bulk->front().value));
response->Set( rsp );
}
delete bulk;
handler->HandleResponse( status, response );
}
private:
ResponseHandler *handler;
};
//----------------------------------------------------------------------------
// Helper class for creating null references for particular types
//
// @arg Response : type for which we need a null reference
//----------------------------------------------------------------------------
template<typename Response>
struct NullRef
{
static Response value;
};
//----------------------------------------------------------------------------
// Initialize the 'null-reference'
//----------------------------------------------------------------------------
template<typename Response>
Response NullRef<Response>::value;
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
inline Response* GetResponse( AnyObject *rsp )
{
Response *ret = nullptr;
rsp->Get( ret );
return ret;
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
inline Response* GetResponse( XRootDStatus *status, AnyObject *rsp )
{
if( !status->IsOK() ) return &NullRef<Response>::value;
return GetResponse<Response>( rsp );
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
class FunctionWrapper: public ResponseHandler
{
public:
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
FunctionWrapper(
std::function<void( XRootDStatus&, Response& )> handleFunction ) :
fun( [handleFunction]( XRootDStatus &s, Response &r, HostList& ){ handleFunction( s, r ); } )
{
}
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
FunctionWrapper(
std::function<void( XRootDStatus&, Response&, HostList& )> handleFunction ) :
fun( handleFunction )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponseWithHosts( XRootDStatus *status, AnyObject *response, HostList *hostList )
{
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<AnyObject> delrsp( response );
std::unique_ptr<HostList> delhl( hostList );
Response *res = GetResponse<Response>( status, response );
fun( *status, *res, *hostList );
}
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::function<void( XRootDStatus&, Response&, HostList& )> fun;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<>
class FunctionWrapper<void> : public ResponseHandler
{
public:
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
FunctionWrapper(
std::function<void( XRootDStatus& )> handleFunction ) :
fun( [handleFunction]( XRootDStatus& s, HostList& ){ handleFunction( s ); } )
{
}
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
FunctionWrapper(
std::function<void( XRootDStatus&, HostList& )> handleFunction ) :
fun( handleFunction )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponseWithHosts( XRootDStatus *status, AnyObject *response, HostList *hostList )
{
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<AnyObject> delrsp( response );
std::unique_ptr<HostList> delhl( hostList );
fun( *status, *hostList );
}
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::function<void( XRootDStatus&, HostList& )> fun;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response, typename Return>
class TaskWrapper: public ResponseHandler
{
public:
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
TaskWrapper( std::packaged_task<Return( XRootDStatus&, Response& )> && task ) :
task( std::move( task ) )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response )
{
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<AnyObject> delrsp( response );
Response *resp = GetResponse<Response>( status, response );
task( *status, *resp );
}
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::packaged_task<Return( XRootDStatus&, Response& )> task;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Return>
class TaskWrapper<void, Return>: public ResponseHandler
{
public:
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
TaskWrapper( std::packaged_task<Return( XRootDStatus& )> && task ) :
task( std::move( task ) )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response )
{
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<AnyObject> delrsp( response );
task( *status );
}
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::packaged_task<Return( XRootDStatus& )> task;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class ExOpenFuncWrapper: public ResponseHandler
{
public:
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
ExOpenFuncWrapper( const Ctx<File> &f,
std::function<void( XRootDStatus&, StatInfo& )> handleFunction ) :
f( f ), fun( [handleFunction]( XRootDStatus &s, StatInfo &i, HostList& ){ handleFunction( s, i ); } )
{
}
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
ExOpenFuncWrapper( const Ctx<File> &f,
std::function<void( XRootDStatus&, StatInfo&, HostList& )> handleFunction ) :
f( f ), fun( handleFunction )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponseWithHosts( XRootDStatus *status, AnyObject *response, HostList *hostList )
{
delete response;
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<StatInfo> delrsp;
std::unique_ptr<HostList> delhl;
StatInfo *info = nullptr;
if( status->IsOK() )
{
XRootDStatus st = f->Stat( false, info );
delrsp.reset( info );
}
else
info = &NullRef<StatInfo>::value;
fun( *status, *info, *hostList );
}
private:
Ctx<File> f;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::function<void( XRootDStatus&, StatInfo&, HostList& )> fun;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class PipelineException : public std::exception
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
PipelineException( const XRootDStatus &error ) : error( error ), strerr( error.ToString() )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
PipelineException( const PipelineException &ex ) : error( ex.error ), strerr( ex.error.ToString() )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
PipelineException& operator=( const PipelineException &ex )
{
error = ex.error;
strerr = ex.strerr;
return *this;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
const char* what() const noexcept
{
return strerr.c_str();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
const XRootDStatus& GetError() const
{
return error;
}
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus error;
std::string strerr;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
class FutureWrapperBase : public ResponseHandler
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FutureWrapperBase( std::future<Response> &ftr ) : fulfilled( false )
{
ftr = prms.get_future();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual ~FutureWrapperBase()
{
if( !fulfilled ) SetException( XRootDStatus( stError, errPipelineFailed ) );
}
protected:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline void SetException( const XRootDStatus &err )
{
std::exception_ptr ex = std::make_exception_ptr( PipelineException( err ) );
prms.set_exception( ex );
fulfilled = true;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
std::promise<Response> prms;
bool fulfilled;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
class FutureWrapper : public FutureWrapperBase<Response>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FutureWrapper( std::future<Response> &ftr ) : FutureWrapperBase<Response>( ftr )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response )
{
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<AnyObject> delrsp( response );
if( status->IsOK() )
{
Response *resp = GetResponse<Response>( response );
if( resp == &NullRef<Response>::value )
this->SetException( XRootDStatus( stError, errInternal ) );
else
{
this->prms.set_value( std::move( *resp ) );
this->fulfilled = true;
}
}
else
this->SetException( *status );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<>
class FutureWrapper<void> : public FutureWrapperBase<void>
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
FutureWrapper( std::future<void> &ftr ) : FutureWrapperBase<void>( ftr )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse( XRootDStatus *status, AnyObject *response )
{
std::unique_ptr<XRootDStatus> delst( status );
std::unique_ptr<AnyObject> delrsp( response );
if( status->IsOK() )
{
prms.set_value();
fulfilled = true;
}
else
SetException( *status );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class RawWrapper : public ResponseHandler
{
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
RawWrapper( ResponseHandler *handler ) : handler( handler )
{
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual void HandleResponseWithHosts( XRootDStatus *status,
AnyObject *response,
HostList *hostList )
{
handler->HandleResponseWithHosts( status, response, hostList );
}
private:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
ResponseHandler *handler;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
struct RespBase
{
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( ResponseHandler *hdlr )
{
return new RawWrapper( hdlr );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( ResponseHandler &hdlr )
{
return new RawWrapper( &hdlr );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( std::future<Response> &ftr )
{
return new FutureWrapper<Response>( ftr );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<typename Response>
struct Resp: RespBase<Response>
{
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( std::function<void( XRootDStatus&,
Response& )> func )
{
return new FunctionWrapper<Response>( func );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( std::function<void( XRootDStatus&,
Response&, HostList& )> func )
{
return new FunctionWrapper<Response>( func );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<typename Return>
inline static ResponseHandler* Create( std::packaged_task<Return( XRootDStatus&,
Response& )> &task )
{
return new TaskWrapper<Response, Return>( std::move( task ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using RespBase<Response>::Create;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template<>
struct Resp<void>: RespBase<void>
{
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( std::function<void( XRootDStatus& )> func )
{
return new FunctionWrapper<void>( func );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
inline static ResponseHandler* Create( std::function<void( XRootDStatus&, HostList& )> func )
{
return new FunctionWrapper<void>( func );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
template<typename Return>
inline static ResponseHandler* Create( std::packaged_task<Return( XRootDStatus& )> &task )
{
return new TaskWrapper<void, Return>( std::move( task ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
using RespBase<void>::Create;
};
}
#endif // __XRD_CL_OPERATIONS_HANDLERS_HH__
XrdClCtx.hh
XrdClFile.hh
Create
bool Create
Definition XrdSecpwdSrvAdmin.cc:176
XrdCl::AnyObject
Definition XrdClAnyObject.hh:33
XrdCl::AnyObject::Set
void Set(Type object, bool own=true)
Definition XrdClAnyObject.hh:59
XrdCl::AnyObject::Get
void Get(Type &object)
Retrieve the object being held.
Definition XrdClAnyObject.hh:78
XrdCl::ExOpenFuncWrapper::HandleResponseWithHosts
void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Callback method.
Definition XrdClOperationHandlers.hh:372
XrdCl::ExOpenFuncWrapper::ExOpenFuncWrapper
ExOpenFuncWrapper(const Ctx< File > &f, std::function< void(XRootDStatus &, StatInfo &, HostList &)> handleFunction)
Constructor.
Definition XrdClOperationHandlers.hh:363
XrdCl::ExOpenFuncWrapper::ExOpenFuncWrapper
ExOpenFuncWrapper(const Ctx< File > &f, std::function< void(XRootDStatus &, StatInfo &)> handleFunction)
Constructor.
Definition XrdClOperationHandlers.hh:352
XrdCl::FunctionWrapper< void >::FunctionWrapper
FunctionWrapper(std::function< void(XRootDStatus &, HostList &)> handleFunction)
Constructor.
Definition XrdClOperationHandlers.hh:235
XrdCl::FunctionWrapper< void >::HandleResponseWithHosts
void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Callback method.
Definition XrdClOperationHandlers.hh:244
XrdCl::FunctionWrapper< void >::FunctionWrapper
FunctionWrapper(std::function< void(XRootDStatus &)> handleFunction)
Constructor.
Definition XrdClOperationHandlers.hh:224
XrdCl::FunctionWrapper
Definition XrdClOperationHandlers.hh:165
XrdCl::FunctionWrapper::FunctionWrapper
FunctionWrapper(std::function< void(XRootDStatus &, Response &, HostList &)> handleFunction)
Constructor.
Definition XrdClOperationHandlers.hh:184
XrdCl::FunctionWrapper::FunctionWrapper
FunctionWrapper(std::function< void(XRootDStatus &, Response &)> handleFunction)
Constructor.
Definition XrdClOperationHandlers.hh:173
XrdCl::FunctionWrapper::HandleResponseWithHosts
void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Callback method.
Definition XrdClOperationHandlers.hh:193
XrdCl::FutureWrapperBase::fulfilled
bool fulfilled
Definition XrdClOperationHandlers.hh:502
XrdCl::FutureWrapperBase::SetException
void SetException(const XRootDStatus &err)
Definition XrdClOperationHandlers.hh:491
XrdCl::FutureWrapperBase::prms
std::promise< Response > prms
promise that corresponds to the future
Definition XrdClOperationHandlers.hh:501
XrdCl::FutureWrapperBase::~FutureWrapperBase
virtual ~FutureWrapperBase()
Destructor.
Definition XrdClOperationHandlers.hh:479
XrdCl::FutureWrapperBase::FutureWrapperBase
FutureWrapperBase(std::future< Response > &ftr)
Definition XrdClOperationHandlers.hh:471
XrdCl::FutureWrapper< void >::FutureWrapper
FutureWrapper(std::future< void > &ftr)
Definition XrdClOperationHandlers.hh:560
XrdCl::FutureWrapper< void >::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback method.
Definition XrdClOperationHandlers.hh:567
XrdCl::FutureWrapper
Definition XrdClOperationHandlers.hh:512
XrdCl::FutureWrapper::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback method.
Definition XrdClOperationHandlers.hh:527
XrdCl::FutureWrapper::FutureWrapper
FutureWrapper(std::future< Response > &ftr)
Definition XrdClOperationHandlers.hh:520
XrdCl::PipelineException
Pipeline exception, wrapps an XRootDStatus.
Definition XrdClOperationHandlers.hh:401
XrdCl::PipelineException::GetError
const XRootDStatus & GetError() const
Definition XrdClOperationHandlers.hh:441
XrdCl::PipelineException::PipelineException
PipelineException(const XRootDStatus &error)
Constructor from XRootDStatus.
Definition XrdClOperationHandlers.hh:407
XrdCl::PipelineException::PipelineException
PipelineException(const PipelineException &ex)
Copy constructor.
Definition XrdClOperationHandlers.hh:415
XrdCl::PipelineException::operator=
PipelineException & operator=(const PipelineException &ex)
Assigment operator.
Definition XrdClOperationHandlers.hh:423
XrdCl::PipelineException::what
const char * what() const noexcept
inherited from std::exception
Definition XrdClOperationHandlers.hh:433
XrdCl::RawWrapper
Wrapper class for raw response handler (ResponseHandler).
Definition XrdClOperationHandlers.hh:586
XrdCl::RawWrapper::HandleResponseWithHosts
virtual void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
Definition XrdClOperationHandlers.hh:604
XrdCl::RawWrapper::RawWrapper
RawWrapper(ResponseHandler *handler)
Definition XrdClOperationHandlers.hh:594
XrdCl::ResponseHandler
Handle an async response.
Definition XrdClXRootDResponses.hh:1127
XrdCl::StatInfo
Object stat info.
Definition XrdClXRootDResponses.hh:401
XrdCl::TaskWrapper< void, Return >::TaskWrapper
TaskWrapper(std::packaged_task< Return(XRootDStatus &)> &&task)
Constructor.
Definition XrdClOperationHandlers.hh:316
XrdCl::TaskWrapper< void, Return >::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback method.
Definition XrdClOperationHandlers.hh:324
XrdCl::TaskWrapper
Definition XrdClOperationHandlers.hh:267
XrdCl::TaskWrapper::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback method.
Definition XrdClOperationHandlers.hh:283
XrdCl::TaskWrapper::TaskWrapper
TaskWrapper(std::packaged_task< Return(XRootDStatus &, Response &)> &&task)
Constructor.
Definition XrdClOperationHandlers.hh:275
XrdCl::UnpackXAttrStatus::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback method.
Definition XrdClOperationHandlers.hh:52
XrdCl::UnpackXAttrStatus::UnpackXAttrStatus
UnpackXAttrStatus(ResponseHandler *handler)
Definition XrdClOperationHandlers.hh:45
XrdCl::UnpackXAttr::HandleResponse
void HandleResponse(XRootDStatus *status, AnyObject *response)
Callback method.
Definition XrdClOperationHandlers.hh:89
XrdCl::UnpackXAttr::UnpackXAttr
UnpackXAttr(ResponseHandler *handler)
Definition XrdClOperationHandlers.hh:82
XrdCl::XRootDStatus
Request status.
Definition XrdClXRootDResponses.hh:219
XrdCl
Definition XrdClAction.hh:34
XrdCl::GetResponse
Response * GetResponse(AnyObject *rsp)
Definition XrdClOperationHandlers.hh:137
XrdCl::stError
const uint16_t stError
An error occurred that could potentially be retried.
Definition XrdClStatus.hh:32
XrdCl::HostList
std::vector< HostInfo > HostList
Definition XrdClXRootDResponses.hh:1121
XrdCl::errInternal
const uint16_t errInternal
Internal error.
Definition XrdClStatus.hh:56
XrdCl::errPipelineFailed
const uint16_t errPipelineFailed
Pipeline failed and operation couldn't be executed.
Definition XrdClStatus.hh:66
XrdCl::Ctx
Utility class for storing a pointer to operation context.
Definition XrdClCtx.hh:39
XrdCl::NullRef
Definition XrdClOperationHandlers.hh:120
XrdCl::NullRef::value
static Response value
Definition XrdClOperationHandlers.hh:121
XrdCl::RespBase
Definition XrdClOperationHandlers.hh:627
XrdCl::RespBase::Create
static ResponseHandler * Create(ResponseHandler *hdlr)
Definition XrdClOperationHandlers.hh:634
XrdCl::RespBase::Create
static ResponseHandler * Create(ResponseHandler &hdlr)
Definition XrdClOperationHandlers.hh:645
XrdCl::RespBase::Create
static ResponseHandler * Create(std::future< Response > &ftr)
Definition XrdClOperationHandlers.hh:656
XrdCl::Resp< void >::Create
static ResponseHandler * Create(std::packaged_task< Return(XRootDStatus &)> &task)
Definition XrdClOperationHandlers.hh:751
XrdCl::Resp< void >::Create
static ResponseHandler * Create(std::function< void(XRootDStatus &, HostList &)> func)
Definition XrdClOperationHandlers.hh:739
XrdCl::Resp< void >::Create
static ResponseHandler * Create(std::function< void(XRootDStatus &)> func)
Definition XrdClOperationHandlers.hh:728
XrdCl::Resp
Definition XrdClOperationHandlers.hh:670
XrdCl::Resp::Create
static ResponseHandler * Create(std::packaged_task< Return(XRootDStatus &, Response &)> &task)
Definition XrdClOperationHandlers.hh:702
XrdCl::Resp::Create
static ResponseHandler * Create(std::function< void(XRootDStatus &, Response &)> func)
Definition XrdClOperationHandlers.hh:677
XrdCl::Resp::Create
static ResponseHandler * Create(std::function< void(XRootDStatus &, Response &, HostList &)> func)
Definition XrdClOperationHandlers.hh:689
XrdCl::Status::IsOK
bool IsOK() const
We're fine.
Definition XrdClStatus.hh:124