XRootD
XrdCl::RedirectEntry Struct Reference

#include <XrdClXRootDMsgHandler.hh>

+ Collaboration diagram for XrdCl::RedirectEntry:

Public Types

enum  Type {
  EntryRedirect ,
  EntryRedirectOnWait ,
  EntryRetry ,
  EntryWait
}
 

Public Member Functions

 RedirectEntry (const URL &from, const URL &to, Type type)
 
std::string ToString (bool prevok=true)
 

Public Attributes

URL from
 
XRootDStatus status
 
URL to
 
Type type
 

Detailed Description

Definition at line 70 of file XrdClXRootDMsgHandler.hh.

Member Enumeration Documentation

◆ Type

Enumerator
EntryRedirect 
EntryRedirectOnWait 
EntryRetry 
EntryWait 

Definition at line 72 of file XrdClXRootDMsgHandler.hh.

Constructor & Destructor Documentation

◆ RedirectEntry()

XrdCl::RedirectEntry::RedirectEntry ( const URL from,
const URL to,
Type  type 
)
inline

Definition at line 80 of file XrdClXRootDMsgHandler.hh.

Member Function Documentation

◆ ToString()

std::string XrdCl::RedirectEntry::ToString ( bool  prevok = true)
inline

Definition at line 91 of file XrdClXRootDMsgHandler.hh.

92  {
93  const std::string tostr = to.GetLocation();
94  const std::string fromstr = from.GetLocation();
95 
96  if( prevok )
97  {
98  switch( type )
99  {
100  case EntryRedirect: return "Redirected from: " + fromstr + " to: "
101  + tostr;
102 
103  case EntryRedirectOnWait: return "Server responded with wait. "
104  "Falling back to virtual redirector: " + tostr;
105 
106  case EntryRetry: return "Retrying: " + tostr;
107 
108  case EntryWait: return "Waited at server request. Resending: "
109  + tostr;
110  }
111  }
112  return "Failed at: " + fromstr + ", retrying at: " + tostr;
113  }
std::string GetLocation() const
Get location (protocol://host:port/path)
Definition: XrdClURL.cc:337

References EntryRedirect, EntryRedirectOnWait, EntryRetry, EntryWait, from, XrdCl::URL::GetLocation(), to, and type.

+ Here is the call graph for this function:

Member Data Documentation

◆ from

URL XrdCl::RedirectEntry::from

Definition at line 86 of file XrdClXRootDMsgHandler.hh.

Referenced by ToString().

◆ status

XRootDStatus XrdCl::RedirectEntry::status

Definition at line 89 of file XrdClXRootDMsgHandler.hh.

◆ to

URL XrdCl::RedirectEntry::to

Definition at line 87 of file XrdClXRootDMsgHandler.hh.

Referenced by ToString().

◆ type

Type XrdCl::RedirectEntry::type

Definition at line 88 of file XrdClXRootDMsgHandler.hh.

Referenced by ToString().


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