|
xrootd
|
#include <XrdClURL.hh>

Public Types | |
| typedef std::map< std::string, std::string > | ParamsMap |
Public Member Functions | |
| URL () | |
| Default constructor. More... | |
| URL (const std::string &url) | |
| bool | IsValid () const |
| Is the url valid. More... | |
| std::string | GetURL () const |
| Get the URL. More... | |
| std::string | GetHostId () const |
| Get the host part of the URL (user:password@host:port) More... | |
| std::string | GetLocation () const |
| Get protocol://host:port/path. More... | |
| const std::string & | GetProtocol () const |
| Get the protocol. More... | |
| void | SetProtocol (const std::string &protocol) |
| Set protocol. More... | |
| const std::string & | GetUserName () const |
| Get the username. More... | |
| void | SetUserName (const std::string &userName) |
| Set the username. More... | |
| const std::string & | GetPassword () const |
| Get the password. More... | |
| void | SetPassword (const std::string &password) |
| Set the password. More... | |
| const std::string & | GetHostName () const |
| Get the name of the target host. More... | |
| void | SetHostName (const std::string &hostName) |
| Set the host name. More... | |
| int | GetPort () const |
| Get the target port. More... | |
| void | SetPort (int port) |
| const std::string & | GetPath () const |
| Get the path. More... | |
| void | SetPath (const std::string &path) |
| Set the path. More... | |
| std::string | GetPathWithParams () const |
| Get the path with params. More... | |
| const ParamsMap & | GetParams () const |
| Get the URL params. More... | |
| ParamsMap & | GetParams () |
| Get the URL params. More... | |
| std::string | GetParamsAsString () const |
| Get the URL params as string. More... | |
| void | SetParams (const std::string ¶ms) |
| Set params. More... | |
| bool | FromString (const std::string &url) |
| Parse a string and fill the URL fields. More... | |
| void | Clear () |
| Clear the url. More... | |
Private Member Functions | |
| bool | ParseHostInfo (const std::string hhostInfo) |
| bool | ParsePath (const std::string &path) |
Private Attributes | |
| std::string | pHostId |
| std::string | pProtocol |
| std::string | pUserName |
| std::string | pPassword |
| std::string | pHostName |
| int | pPort |
| std::string | pPath |
| ParamsMap | pParams |
URL representation.
| typedef std::map<std::string, std::string> XrdCl::URL::ParamsMap |
Map of get params
| XrdCl::URL::URL | ( | ) |
Default constructor.
| XrdCl::URL::URL | ( | const std::string & | url | ) |
Constructor
| url | an url in format: protocol://user:password@host:port/path?param1=x¶m2=y |
References FromString().
| void XrdCl::URL::Clear | ( | ) |
| bool XrdCl::URL::FromString | ( | const std::string & | url | ) |
Parse a string and fill the URL fields.
References Clear(), XrdCl::Log::Dump(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), ParseHostInfo(), ParsePath(), pHostName, pPassword, pPath, pPort, pProtocol, pUserName, and XrdCl::UtilityMsg.
Referenced by URL().
| std::string XrdCl::URL::GetHostId | ( | ) | const |
Get the host part of the URL (user:password@host:port)
References pHostName, pPort, and pUserName.
Referenced by XrdCl::FileSystem::AssignLoadBalancer(), BuildPrompt(), XrdCl::ThirdPartyCopyJob::CanDo(), XrdCl::Channel::Channel(), XrdCl::FileStateHandler::Close(), XrdCl::Stream::EnableLink(), XrdCl::PostMaster::GetChannel(), XrdCl::FileStateHandler::GetDataServer(), XrdCl::XRootDMsgHandler::HandleError(), XrdCl::Stream::MonitorDisconnection(), XrdCl::FileStateHandler::OnClose(), XrdCl::Stream::OnConnect(), XrdCl::XRootDMsgHandler::OnIncoming(), XrdCl::FileStateHandler::OnOpen(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::XRootDMsgHandler::OnStreamEvent(), XrdCl::XRootDMsgHandler::ParseResponse(), XrdCl::FileStateHandler::Read(), XrdCl::FileStateHandler::ReOpenFileAtServer(), XrdCl::XRootDMsgHandler::RewriteRequestRedirect(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::FileSystem::Send(), XrdCl::MessageUtils::SendMessage(), XrdCl::AsyncSocketHandler::SetStream(), XrdCl::FileStateHandler::Stat(), XrdCl::Stream::Stream(), XrdCl::FileStateHandler::Sync(), XrdCl::FileStateHandler::Truncate(), XrdCl::XRootDMsgHandler::UnpackVectorRead(), XrdCl::FileStateHandler::VectorRead(), and XrdCl::FileStateHandler::Write().
|
inline |
Get the name of the target host.
References pHostName.
Referenced by XrdCl::XRootDTransport::GetCredentials(), XrdCl::Utils::GetHostAddresses(), XrdCl::XRootDMsgHandler::ParseResponse(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::XRootDMsgHandler::UpdateTriedCGI(), and UtilsTest::URLTest().
| std::string XrdCl::URL::GetLocation | ( | ) | const |
|
inline |
Get the URL params.
References pParams.
Referenced by XrdCl::MessageUtils::AppendCGI(), XrdCl::ThirdPartyCopyJob::CanDo(), XrdCl::XRootDMsgHandler::OnIncoming(), XrdCl::FileStateHandler::OnOpen(), XrdCl::FileStateHandler::OnStateRedirection(), XrdCl::FileStateHandler::Open(), XrdCl::ClassicCopyJob::Run(), XrdCl::ThirdPartyCopyJob::Run(), and UtilsTest::URLTest().
| std::string XrdCl::URL::GetParamsAsString | ( | ) | const |
|
inline |
|
inline |
Get the path.
References pPath.
Referenced by main(), XrdCl::FileStateHandler::OnOpen(), XrdCl::FileStateHandler::Open(), XrdCl::CopyProcess::Prepare(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::FileStateHandler::Stat(), and UtilsTest::URLTest().
| std::string XrdCl::URL::GetPathWithParams | ( | ) | const |
Get the path with params.
References GetParamsAsString(), and pPath.
Referenced by GetURL(), XrdCl::FileStateHandler::Open(), XrdCl::FileStateHandler::ReOpenFileAtServer(), XrdCl::ThirdPartyCopyJob::Run(), and UtilsTest::URLTest().
|
inline |
Get the target port.
References pPort.
Referenced by XrdCl::Utils::GetHostAddresses(), XrdCl::XRootDMsgHandler::ParseResponse(), and UtilsTest::URLTest().
|
inline |
Get the protocol.
References pProtocol.
Referenced by XrdCl::ThirdPartyCopyJob::CanDo(), XrdCl::PostMaster::GetChannel(), XrdCl::CopyProcess::Prepare(), XrdCl::ClassicCopyJob::Run(), and UtilsTest::URLTest().
| std::string XrdCl::URL::GetURL | ( | ) | const |
Get the URL.
References GetPathWithParams(), IsValid(), pHostName, pPassword, pPort, pProtocol, and pUserName.
Referenced by XrdCl::FileStateHandler::AfterForkChild(), ProgressDisplay::BeginJob(), XrdCl::ThirdPartyCopyJob::CanDo(), XrdCl::ClassicCopyJob::ClassicCopyJob(), XrdCl::FileStateHandler::Close(), MonitorTest::Event(), XrdCl::FileStateHandler::FailMessage(), XrdCl::FileSystem::FileSystem(), XrdCl::FileStateHandler::OnClose(), XrdCl::FileStateHandler::OnOpen(), XrdCl::FileStateHandler::OnStateError(), XrdCl::FileStateHandler::OnStateResponse(), XrdCl::FileStateHandler::Open(), XrdCl::FileStateHandler::Read(), XrdCl::FileStateHandler::RecoverMessage(), XrdCl::FileStateHandler::ReOpenFileAtServer(), XrdCl::FileStateHandler::ReWriteFileHandle(), XrdCl::ThirdPartyCopyJob::Run(), XrdCl::FileStateHandler::RunRecovery(), XrdCl::FileStateHandler::Stat(), XrdCl::FileStateHandler::Sync(), XrdCl::ThirdPartyCopyJob::ThirdPartyCopyJob(), XrdCl::FileStateHandler::Truncate(), XrdCl::FileStateHandler::VectorRead(), and XrdCl::FileStateHandler::Write().
|
inline |
Get the username.
References pUserName.
Referenced by XrdCl::XRootDTransport::GenerateLogIn(), and UtilsTest::URLTest().
| bool XrdCl::URL::IsValid | ( | ) | const |
Is the url valid.
References pHostName, pPath, and pProtocol.
Referenced by GetURL(), XrdCl::XRootDMsgHandler::HandleError(), main(), XrdCl::XRootDMsgHandler::OnIncoming(), XrdCl::FileStateHandler::Open(), XrdCl::MessageUtils::SendMessage(), XrdCl::XRootDMsgHandler::SetLoadBalancer(), and UtilsTest::URLTest().
|
private |
|
private |
References pPath, and SetParams().
Referenced by FromString().
|
inline |
Set the host name.
References pHostName.
| void XrdCl::URL::SetParams | ( | const std::string & | params | ) |
Set params.
References pParams, and XrdCl::Utils::splitString().
Referenced by ParsePath(), and XrdCl::ThirdPartyCopyJob::Run().
|
inline |
Set the password.
References pPassword.
|
inline |
|
inline |
References XrdMonCtrCollector::port, and pPort.
Referenced by PostMasterTest::MultiIPConnectionTest().
|
inline |
Set protocol.
References pProtocol.
|
inline |
Set the username.
References pUserName.
|
private |
Referenced by Clear().
|
private |
Referenced by Clear(), FromString(), GetHostId(), GetHostName(), GetLocation(), GetURL(), IsValid(), ParseHostInfo(), and SetHostName().
|
private |
Referenced by Clear(), GetParams(), GetParamsAsString(), and SetParams().
|
private |
Referenced by Clear(), FromString(), GetPassword(), GetURL(), ParseHostInfo(), and SetPassword().
|
private |
Referenced by Clear(), FromString(), GetLocation(), GetPath(), GetPathWithParams(), IsValid(), ParsePath(), and SetPath().
|
private |
Referenced by Clear(), FromString(), GetHostId(), GetLocation(), GetPort(), GetURL(), ParseHostInfo(), and SetPort().
|
private |
Referenced by Clear(), FromString(), GetLocation(), GetProtocol(), GetURL(), IsValid(), ParseHostInfo(), and SetProtocol().
|
private |
Referenced by Clear(), FromString(), GetHostId(), GetURL(), GetUserName(), ParseHostInfo(), and SetUserName().
1.8.3.1