![]() |
XRootD
|
#include <XrdClURL.hh>
Public Types | |
typedef std::map< std::string, std::string > | ParamsMap |
Public Member Functions | |
URL () | |
Default constructor. More... | |
URL (const char *url) | |
URL (const std::string &url) | |
void | Clear () |
Clear the url. More... | |
bool | FromString (const std::string &url) |
Parse a string and fill the URL fields. More... | |
std::string | GetChannelId () const |
std::string | GetHostId () const |
Get the host part of the URL (user:password@host:port) More... | |
const std::string & | GetHostName () const |
Get the name of the target host. More... | |
std::string | GetLocation () const |
Get location (protocol://host:port/path) More... | |
std::string | GetLoginToken () const |
Get the login token if present in the opaque info. More... | |
std::string | GetObfuscatedURL () const |
Get the URL with authz information obfuscated. More... | |
const ParamsMap & | GetParams () const |
Get the URL params. More... | |
std::string | GetParamsAsString () const |
Get the URL params as string. More... | |
std::string | GetParamsAsString (bool filter) const |
Get the URL params as string. More... | |
const std::string & | GetPassword () const |
Get the password. More... | |
const std::string & | GetPath () const |
Get the path. More... | |
std::string | GetPathWithFilteredParams () const |
Get the path with params, filteres out 'xrdcl.'. More... | |
std::string | GetPathWithParams () const |
Get the path with params. More... | |
int | GetPort () const |
Get the target port. More... | |
const std::string & | GetProtocol () const |
Get the protocol. More... | |
std::string | GetURL () const |
Get the URL. More... | |
const std::string & | GetUserName () const |
Get the username. More... | |
bool | IsLocalFile () const |
bool | IsMetalink () const |
Is it a URL to a metalink. More... | |
bool | IsSecure () const |
Does the protocol indicate encryption. More... | |
bool | IsTPC () const |
Is the URL used in TPC context. More... | |
bool | IsValid () const |
Is the url valid. More... | |
void | SetHostName (const std::string &hostName) |
Set the host name. More... | |
void | SetHostPort (const std::string &hostName, int port) |
void | SetParams (const ParamsMap ¶ms) |
Set params. More... | |
void | SetParams (const std::string ¶ms) |
Set params. More... | |
void | SetPassword (const std::string &password) |
Set the password. More... | |
void | SetPath (const std::string &path) |
Set the path. More... | |
void | SetPort (int port) |
void | SetProtocol (const std::string &protocol) |
Set protocol. More... | |
void | SetUserName (const std::string &userName) |
Set the username. More... | |
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 46 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 52 of file XrdClURL.cc.
References FromString().
void XrdCl::URL::Clear | ( | ) |
Clear the url.
Definition at line 429 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 61 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().
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 505 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::Stream::Stream(), XrdCl::XRootDMsgHandler::XRootDMsgHandler(), XrdCl::XRootDMsgHandler::~XRootDMsgHandler(), XrdCl::FileSystemData::AssignLastURL(), XrdCl::FileSystemData::AssignLoadBalancer(), BuildPrompt(), XrdCl::PostMaster::CollapseRedirect(), XrdCl::Stream::EnableLink(), XrdCl::XRootDMsgHandler::Examine(), XrdCl::FileStateHandler::GetProperty(), XrdCl::XRootDMsgHandler::InspectStatusRsp(), XrdCl::ZipArchive::List(), XrdCl::FileStateHandler::OnClose(), XrdCl::Stream::OnConnect(), XrdCl::FileStateHandler::OnOpen(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::XRootDMsgHandler::OnStreamEvent(), ProgressDisplay::PrintCheckSum(), XrdCl::XRootDMsgHandler::Process(), XrdCl::AsyncDiscardReader::Read(), XrdCl::AsyncRawReader::Read(), XrdCl::AsyncVectorReader::Read(), XrdCl::MessageUtils::RedirectMessage(), XrdCl::MessageUtils::SendMessage(), XrdCl::AsyncSocketHandler::ToStreamName(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
inline |
Get the name of the target host.
Definition at line 170 of file XrdClURL.hh.
Referenced by XrdCl::Stream::CanCollapse(), XrdCl::AsyncSocketHandler::DoTlsHandShake(), XrdCl::Stream::EnableLink(), XrdCl::Utils::GetHostAddresses(), XrdCl::HttpFileSystemPlugIn::Mv(), and XrdCl::HttpFileSystemPlugIn::Stat().
std::string XrdCl::URL::GetLocation | ( | ) | const |
Get location (protocol://host:port/path)
Get protocol://host:port/path.
Definition at line 337 of file XrdClURL.cc.
Referenced by XrdCl::RedirectorRegistry::Get(), XrdCl::HttpFilePlugIn::Open(), XrdCl::RedirectorRegistry::Release(), and XrdCl::RedirectEntry::ToString().
std::string XrdCl::URL::GetLoginToken | ( | ) | const |
Get the login token if present in the opaque info.
Definition at line 360 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 491 of file XrdClURL.cc.
References obfuscateAuth().
Referenced by XrdCl::FileSystem::FileSystem(), XrdCl::HttpFileSystemPlugIn::HttpFileSystemPlugIn(), XrdCl::FileStateHandler::AfterForkChild(), DoTail(), XrdPosixAdmin::isOK(), XrdCl::FileStateHandler::OnClose(), XrdCl::FileStateHandler::OnOpen(), and XrdCl::FileStateHandler::TimeOutRequests().
|
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::FileStateHandler::OnOpen(), 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 352 of file XrdClURL.cc.
Referenced by 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 371 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::FileStateHandler::OnOpen(), XrdCl::EcHandler::Open(), 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 324 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 311 of file XrdClURL.cc.
References GetParamsAsString().
Referenced by XrdPosixAdmin::FanOut(), main(), XrdPosixXrootd::Mkdir(), XrdPosixDir::Open(), XrdPosixAdmin::Query(), XrdPosixXrootd::Rename(), XrdPosixXrootd::Rmdir(), XrdPosixAdmin::Stat(), XrdPosixXrootd::Statvfs(), XrdPosixXrootd::Truncate(), and XrdPosixXrootd::Unlink().
|
inline |
Get the target port.
Definition at line 188 of file XrdClURL.hh.
Referenced by XrdPosixXrootd::endPoint(), XrdCl::Utils::GetHostAddresses(), XrdCl::HttpFileSystemPlugIn::Mv(), and XrdCl::HttpFileSystemPlugIn::Stat().
|
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::HttpFileSystemPlugIn::Mv(), XrdCl::CopyProcess::Prepare(), ProgressDisplay::PrintCheckSum(), XrdCl::XRootDMsgHandler::Process(), and XrdCl::HttpFileSystemPlugIn::Stat().
|
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(), XrdCl::FileStateHandler::GetProperty(), 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 467 of file XrdClURL.cc.
Referenced by XrdCl::FileStateHandler::~FileStateHandler(), XrdCl::Utils::HasPgRW(), XrdCl::Utils::HasXAttr(), XrdCl::Utils::InferChecksumType(), XrdCl::FileStateHandler::OnOpen(), ProgressDisplay::PrintCheckSum(), and XrdCl::XRootDMsgHandler::Process().
bool XrdCl::URL::IsMetalink | ( | ) | const |
Is it a URL to a metalink.
Definition at line 458 of file XrdClURL.cc.
References XrdCl::DefaultMetalinkProcessing, XrdCl::DefaultEnv::GetEnv(), and XrdCl::Env::GetInt().
Referenced by XrdCl::FileStateHandler::~FileStateHandler(), XrdCl::Utils::InferChecksumType(), XrdCl::FileStateHandler::OnOpen(), XrdCl::CopyProcess::Prepare(), and XrdCl::XRootDMsgHandler::Process().
bool XrdCl::URL::IsSecure | ( | ) | const |
Does the protocol indicate encryption.
Definition at line 475 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
bool XrdCl::URL::IsTPC | ( | ) | const |
Is the URL used in TPC context.
Definition at line 483 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
bool XrdCl::URL::IsValid | ( | ) | const |
Is the url valid.
Definition at line 445 of file XrdClURL.cc.
Referenced by XrdCl::Stream::EnableLink(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdPosixAdmin::isOK(), 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 395 of file XrdClURL.cc.
References XrdCl::Utils::splitString().
Referenced by XrdCl::Channel::Channel(), XrdCl::FileStateHandler::OnOpen(), 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 XrdCl::ZipListHandler::ZipListHandler(), XrdCl::HttpFileSystemPlugIn::DirList(), DoTail(), XrdCl::HttpFileSystemPlugIn::MkDir(), XrdCl::FileStateHandler::OnOpen(), XrdCl::CopyProcess::Prepare(), XrdCl::MessageUtils::RewriteCGIAndPath(), XrdCl::HttpFileSystemPlugIn::Rm(), and XrdCl::HttpFileSystemPlugIn::RmDir().
|
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::Channel::Channel(), XrdCl::FileSystem::DirList(), and XrdCl::XRootDMsgHandler::Process().
|
inline |
Set the username.
Definition at line 143 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().