![]() |
XRootD
|
#include <XrdClURL.hh>
Public Types | |
typedef std::map< std::string, std::string > | ParamsMap |
Public Member Functions | |
URL () | |
Default constructor. | |
URL (const char *url) | |
URL (const std::string &url) | |
void | Clear () |
Clear the url. | |
bool | FromString (const std::string &url) |
Parse a string and fill the URL fields. | |
std::string | GetChannelId () const |
std::string | GetHostId () const |
Get the host part of the URL (user:password@host:port) | |
const std::string & | GetHostName () const |
Get the name of the target host. | |
std::string | GetLocation () const |
Get location (protocol://host:port/path) | |
std::string | GetLoginToken () const |
Get the login token if present in the opaque info. | |
std::string | GetObfuscatedURL () const |
Get the URL with authz information obfuscated. | |
const ParamsMap & | GetParams () const |
Get the URL params. | |
std::string | GetParamsAsString () const |
Get the URL params as string. | |
std::string | GetParamsAsString (bool filter) const |
Get the URL params as string. | |
const std::string & | GetPassword () const |
Get the password. | |
const std::string & | GetPath () const |
Get the path. | |
std::string | GetPathWithFilteredParams () const |
Get the path with params, filteres out 'xrdcl.'. | |
std::string | GetPathWithParams () const |
Get the path with params. | |
int | GetPort () const |
Get the target port. | |
const std::string & | GetProtocol () const |
Get the protocol. | |
std::string | GetURL () const |
Get the URL. | |
const std::string & | GetUserName () const |
Get the username. | |
bool | IsLocalFile () const |
bool | IsMetalink () const |
Is it a URL to a metalink. | |
bool | IsSecure () const |
Does the protocol indicate encryption. | |
bool | IsTPC () const |
Is the URL used in TPC context. | |
bool | IsValid () const |
Is the url valid. | |
void | SetHostName (const std::string &hostName) |
Set the host name. | |
void | SetHostPort (const std::string &hostName, int port) |
void | SetParams (const ParamsMap ¶ms) |
Set params. | |
void | SetParams (const std::string ¶ms) |
Set params. | |
void | SetPassword (const std::string &password) |
Set the password. | |
void | SetPath (const std::string &path) |
Set the path. | |
void | SetPort (int port) |
void | SetProtocol (const std::string &protocol) |
Set protocol. | |
void | SetUserName (const std::string &userName) |
Set the username. | |
URL representation.
Definition at line 30 of file XrdClURL.hh.
typedef std::map<std::string, std::string> XrdCl::URL::ParamsMap |
Map of get params
Definition at line 33 of file XrdClURL.hh.
XrdCl::URL::URL | ( | ) |
XrdCl::URL::URL | ( | const std::string & | url | ) |
Constructor
url | an url in format: protocol://user:password@host:port/path?param1=x¶m2=y |
Definition at line 47 of file XrdClURL.cc.
References FromString().
XrdCl::URL::URL | ( | const char * | url | ) |
Constructor
url | an url in format: protocol://user:password@host:port/path?param1=x¶m2=y |
Definition at line 53 of file XrdClURL.cc.
References FromString().
void XrdCl::URL::Clear | ( | ) |
Clear the url.
Definition at line 436 of file XrdClURL.cc.
Referenced by FromString().
bool XrdCl::URL::FromString | ( | const std::string & | url | ) |
Parse a string and fill the URL fields.
Definition at line 62 of file XrdClURL.cc.
References Clear(), XrdCl::Log::Dump(), XrdCl::Log::DumpMsg, XrdCl::Log::Error(), XrdCl::Log::GetLevel(), XrdCl::DefaultEnv::GetLog(), obfuscateAuth(), unlikely, and XrdCl::UtilityMsg.
Referenced by URL(), and URL().
std::string XrdCl::URL::GetChannelId | ( | ) | const |
Get the host part of the URL (user:password@host:port) plus channel specific CGI (xrdcl.identity & xrd.gsiusrpxy)
Definition at line 512 of file XrdClURL.cc.
Referenced by XrdCl::Channel::Channel(), XrdCl::XRootDChannelInfo::XRootDChannelInfo(), XrdCl::PostMaster::CollapseRedirect(), XrdCl::PostMaster::ForceDisconnect(), XrdCl::PostMaster::ForceReconnect(), XrdCl::SIDMgrPool::GetSIDMgr(), and XrdCl::PostMaster::QueryTransport().
|
inline |
Get the host part of the URL (user:password@host:port)
Definition at line 99 of file XrdClURL.hh.
Referenced by XrdCl::FileSystemData::AssignLastURL(), XrdCl::FileSystemData::AssignLoadBalancer(), BuildPrompt(), XrdCl::PostMaster::CollapseRedirect(), XrdCl::ZipArchive::List(), ProgressDisplay::PrintCheckSum(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::MessageUtils::SendMessage(), and XrdCl::AsyncSocketHandler::ToStreamName().
|
inline |
Get the name of the target host.
Definition at line 170 of file XrdClURL.hh.
Referenced by XrdCl::Stream::CanCollapse(), and XrdCl::Utils::GetHostAddresses().
std::string XrdCl::URL::GetLocation | ( | ) | const |
Get location (protocol://host:port/path)
Get protocol://host:port/path.
Definition at line 344 of file XrdClURL.cc.
Referenced by XrdCl::RedirectorRegistry::Get(), XrdCl::HttpFilePlugIn::Open(), and XrdCl::RedirectorRegistry::Release().
std::string XrdCl::URL::GetLoginToken | ( | ) | const |
Get the login token if present in the opaque info.
Definition at line 367 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
std::string XrdCl::URL::GetObfuscatedURL | ( | ) | const |
Get the URL with authz information obfuscated.
Definition at line 498 of file XrdClURL.cc.
References obfuscateAuth().
Referenced by XrdCl::FileSystem::FileSystem(), and DoTail().
|
inline |
Get the URL params.
Definition at line 244 of file XrdClURL.hh.
Referenced by XrdCl::Channel::Channel(), XrdCl::Utils::CheckEC(), XrdCl::GetEcHandler(), XrdCl::Utils::GetIntParameter(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdCl::Utils::GetStringParameter(), XrdCl::HttpFilePlugIn::Open(), XrdCl::CopyProcess::Prepare(), XrdCl::XRootDMsgHandler::Process(), XrdCl::MessageUtils::RewriteCGIAndPath(), and XrdCl::ClassicCopyJob::Run().
std::string XrdCl::URL::GetParamsAsString | ( | ) | const |
Get the URL params as string.
Definition at line 359 of file XrdClURL.cc.
References GetParamsAsString().
Referenced by GetParamsAsString(), GetPathWithFilteredParams(), and GetPathWithParams().
std::string XrdCl::URL::GetParamsAsString | ( | bool | filter | ) | const |
Get the URL params as string.
Get the URL params as string
filter | : if set to true filters out 'xrdcl.' |
Definition at line 378 of file XrdClURL.cc.
|
inline |
Get the password.
Definition at line 153 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().
|
inline |
Get the path.
Definition at line 217 of file XrdClURL.hh.
Referenced by XrdPfc::Cache::ConsiderCached(), XrdCl::EcPlugInFactory::CreateFile(), XrdPfc::Cache::Decide(), XrdCl::FileSystem::DirList(), XrdPfc::IO::GetFilename(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::ZipArchive::List(), XrdPfc::Cache::LocalFilePath(), main(), XrdCl::CopyProcess::Prepare(), XrdPfc::Cache::Prepare(), ProgressDisplay::PrintCheckSum(), XrdCl::ClassicCopyJob::Run(), XrdPfc::Cache::Stat(), XrdPfc::Cache::Unlink(), and XrdFfsPosix_mkdir().
std::string XrdCl::URL::GetPathWithFilteredParams | ( | ) | const |
Get the path with params, filteres out 'xrdcl.'.
Definition at line 331 of file XrdClURL.cc.
References GetParamsAsString().
Referenced by XrdCl::MessageUtils::RewriteCGIAndPath().
std::string XrdCl::URL::GetPathWithParams | ( | ) | const |
Get the path with params.
Definition at line 318 of file XrdClURL.cc.
References GetParamsAsString().
Referenced by main(), XrdPosixXrootd::Mkdir(), XrdPosixXrootd::Rename(), XrdPosixXrootd::Rmdir(), XrdPosixXrootd::Statvfs(), XrdPosixXrootd::Truncate(), and XrdPosixXrootd::Unlink().
|
inline |
Get the target port.
Definition at line 188 of file XrdClURL.hh.
Referenced by XrdPosixXrootd::endPoint(), and XrdCl::Utils::GetHostAddresses().
|
inline |
Get the protocol.
Definition at line 118 of file XrdClURL.hh.
Referenced by XrdCl::Channel::Channel(), XrdCl::PostMaster::CollapseRedirect(), XrdCl::PlugInManager::GetFactory(), XrdCl::Utils::InferChecksumType(), XrdCl::CopyProcess::Prepare(), ProgressDisplay::PrintCheckSum(), and XrdCl::XRootDMsgHandler::Process().
|
inline |
Get the URL.
Definition at line 86 of file XrdClURL.hh.
Referenced by XrdCl::FileSystem::FileSystem(), XrdCl::FSExecutor::FSExecutor(), ProgressDisplay::BeginJob(), DoTail(), XrdCl::LocalFileHandler::ExecRequest(), main(), XrdCl::LocalFileHandler::Open(), XrdCl::CopyProcess::Prepare(), XrdCl::XRootDMsgHandler::Process(), and XrdCl::PropertyList::Set().
|
inline |
Get the username.
Definition at line 135 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().
bool XrdCl::URL::IsLocalFile | ( | ) | const |
Is it a URL to a local file (file://localhost
Definition at line 474 of file XrdClURL.cc.
Referenced by XrdCl::Utils::HasPgRW(), XrdCl::Utils::HasXAttr(), XrdCl::Utils::InferChecksumType(), ProgressDisplay::PrintCheckSum(), and XrdCl::XRootDMsgHandler::Process().
bool XrdCl::URL::IsMetalink | ( | ) | const |
Is it a URL to a metalink.
Definition at line 465 of file XrdClURL.cc.
References XrdCl::DefaultMetalinkProcessing, XrdCl::DefaultEnv::GetEnv(), and XrdCl::Env::GetInt().
Referenced by XrdCl::Utils::InferChecksumType(), and XrdCl::CopyProcess::Prepare().
bool XrdCl::URL::IsSecure | ( | ) | const |
Does the protocol indicate encryption.
Definition at line 482 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
bool XrdCl::URL::IsTPC | ( | ) | const |
Is the URL used in TPC context.
Definition at line 490 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
bool XrdCl::URL::IsValid | ( | ) | const |
Is the url valid.
Definition at line 452 of file XrdClURL.cc.
Referenced by XrdCl::FileSystemUtils::GetSpaceInfo(), main(), main(), XrdCl::CopyProcess::Prepare(), XrdCl::XRootDMsgHandler::Process(), XrdPosixXrootd::Rename(), XrdCl::MessageUtils::SendMessage(), and XrdCl::XRootDMsgHandler::SetLoadBalancer().
|
inline |
Set the host name.
Definition at line 178 of file XrdClURL.hh.
Referenced by XrdPosixAdmin::FanOut().
|
inline |
Definition at line 206 of file XrdClURL.hh.
|
inline |
Set params.
Definition at line 274 of file XrdClURL.hh.
void XrdCl::URL::SetParams | ( | const std::string & | params | ) |
Set params.
Definition at line 402 of file XrdClURL.cc.
References XrdCl::Utils::splitString().
Referenced by XrdCl::XRootDMsgHandler::Process(), XrdCl::MessageUtils::RewriteCGIAndPath(), and XrdCl::ClassicCopyJob::Run().
|
inline |
Set the password.
Definition at line 161 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().
|
inline |
Set the path.
Definition at line 225 of file XrdClURL.hh.
Referenced by DoTail(), XrdCl::CopyProcess::Prepare(), and XrdCl::MessageUtils::RewriteCGIAndPath().
|
inline |
Definition at line 196 of file XrdClURL.hh.
Referenced by XrdPosixAdmin::FanOut().
|
inline |
Set protocol.
Definition at line 126 of file XrdClURL.hh.
Referenced by XrdCl::FileSystem::DirList(), and XrdCl::XRootDMsgHandler::Process().
|
inline |
Set the username.
Definition at line 143 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().