XRootD
Loading...
Searching...
No Matches
XrdCl::AssignLastURLHandler Class Reference

Wrapper class used to assign last URL. More...

+ Inheritance diagram for XrdCl::AssignLastURLHandler:
+ Collaboration diagram for XrdCl::AssignLastURLHandler:

Public Member Functions

 AssignLastURLHandler (std::shared_ptr< FileSystemData > &fs, ResponseHandler *userHandler)
 
virtual ~AssignLastURLHandler ()
 
virtual void HandleResponseWithHosts (XRootDStatus *status, AnyObject *response, HostList *hostList)
 
- Public Member Functions inherited from XrdCl::ResponseHandler
virtual ~ResponseHandler ()
 
virtual void HandleResponse (XRootDStatus *status, AnyObject *response)
 
virtual void HandleResponseWithHosts (XRootDStatus *status, AnyObject *response, HostList *hostList)
 

Additional Inherited Members

- Static Public Member Functions inherited from XrdCl::ResponseHandler
static ResponseHandlerWrap (std::function< void(XRootDStatus &, AnyObject &)> func)
 
static ResponseHandlerWrap (std::function< void(XRootDStatus *, AnyObject *)> func)
 

Detailed Description

Wrapper class used to assign last URL.

Definition at line 902 of file XrdClFileSystem.cc.

Constructor & Destructor Documentation

◆ AssignLastURLHandler()

XrdCl::AssignLastURLHandler::AssignLastURLHandler ( std::shared_ptr< FileSystemData > &  fs,
ResponseHandler userHandler 
)
inline

Definition at line 908 of file XrdClFileSystem.cc.

909 :
910 pFS(fs), pUserHandler(userHandler) {}

◆ ~AssignLastURLHandler()

virtual XrdCl::AssignLastURLHandler::~AssignLastURLHandler ( )
inlinevirtual

Definition at line 912 of file XrdClFileSystem.cc.

912{}

Member Function Documentation

◆ HandleResponseWithHosts()

void XrdCl::AssignLastURLHandler::HandleResponseWithHosts ( XRootDStatus status,
AnyObject response,
HostList hostList 
)
virtual

Called when a response to associated request arrives or an error occurs

Parameters
statusstatus of the request
responsean object associated with the response (request dependent)
hostListlist of hosts the request was redirected to

Reimplemented from XrdCl::ResponseHandler.

Definition at line 1059 of file XrdClFileSystem.cc.

1062 {
1063 if( status->IsOK() && hostList )
1064 pFS->AssignLastURL( hostList->front().url );
1065
1066 bool finalrsp = !( status->IsOK() && status->code == suContinue );
1067
1068 SyncResponseHandler *syncHandler = dynamic_cast<SyncResponseHandler*>( pUserHandler );
1069 if( !syncHandler )
1070 pUserHandler->HandleResponseWithHosts( status, response, hostList );
1071
1072 if( finalrsp )
1073 {
1074 if( syncHandler )
1075 pUserHandler->HandleResponseWithHosts( status, response, hostList );
1076 delete this;
1077 }
1078 }
virtual void HandleResponseWithHosts(XRootDStatus *status, AnyObject *response, HostList *hostList)
const uint16_t suContinue

References XrdCl::Status::code, XrdCl::ResponseHandler::HandleResponseWithHosts(), XrdCl::Status::IsOK(), and XrdCl::suContinue.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: