![]() |
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. | |
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 43 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 49 of file XrdClURL.cc.
References FromString().
void XrdCl::URL::Clear | ( | ) |
Clear the url.
Definition at line 422 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 58 of file XrdClURL.cc.
References Clear(), XrdCl::Log::Dump(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), 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 494 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 94 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 165 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 330 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 353 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
|
inline |
Get the URL params.
Definition at line 239 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 345 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 364 of file XrdClURL.cc.
|
inline |
Get the password.
Definition at line 148 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().
|
inline |
Get the path.
Definition at line 212 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 317 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 304 of file XrdClURL.cc.
References GetParamsAsString().
Referenced by XrdPosixAdmin::FanOut(), main(), XrdPosixXrootd::Mkdir(), XrdPosixDir::Open(), XrdPosixAdmin::Query(), XrdPosixXrootd::Rename(), XrdPosixXrootd::Rmdir(), XrdPosixAdmin::Stat(), XrdPosixAdmin::Stat(), XrdPosixXrootd::Statvfs(), XrdPosixXrootd::Truncate(), and XrdPosixXrootd::Unlink().
|
inline |
Get the target port.
Definition at line 183 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 113 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(), XrdCl::HttpFileSystemPlugIn::HttpFileSystemPlugIn(), XrdCl::FileStateHandler::AfterForkChild(), ProgressDisplay::BeginJob(), DoTail(), XrdCl::LocalFileHandler::ExecRequest(), XrdCl::FileStateHandler::GetProperty(), XrdPosixAdmin::isOK(), main(), XrdCl::FileStateHandler::OnClose(), XrdCl::FileStateHandler::OnOpen(), XrdCl::LocalFileHandler::Open(), XrdCl::CopyProcess::Prepare(), XrdCl::XRootDMsgHandler::Process(), XrdCl::PropertyList::Set(), and XrdCl::FileStateHandler::TimeOutRequests().
|
inline |
Get the username.
Definition at line 130 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 460 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 451 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 468 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
bool XrdCl::URL::IsTPC | ( | ) | const |
Is the URL used in TPC context.
Definition at line 476 of file XrdClURL.cc.
Referenced by XrdCl::XRootDTransport::InitializeChannel().
bool XrdCl::URL::IsValid | ( | ) | const |
Is the url valid.
Definition at line 438 of file XrdClURL.cc.
Referenced by XrdCl::Stream::EnableLink(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdPosixAdmin::isOK(), 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 173 of file XrdClURL.hh.
Referenced by XrdPosixAdmin::FanOut().
|
inline |
Definition at line 201 of file XrdClURL.hh.
|
inline |
Set params.
Definition at line 269 of file XrdClURL.hh.
void XrdCl::URL::SetParams | ( | const std::string & | params | ) |
Set params.
Definition at line 388 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 156 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().
|
inline |
Set the path.
Definition at line 220 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 191 of file XrdClURL.hh.
Referenced by XrdPosixAdmin::FanOut().
|
inline |
Set protocol.
Definition at line 121 of file XrdClURL.hh.
Referenced by XrdCl::Channel::Channel(), XrdCl::FileSystem::DirList(), and XrdCl::XRootDMsgHandler::Process().
|
inline |
Set the username.
Definition at line 138 of file XrdClURL.hh.
Referenced by XrdCl::XRootDMsgHandler::Process().