|
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... | |
| std::string | GetParamsAsString () const |
| Get the URL params as string. More... | |
| void | SetParams (const std::string ¶ms) |
| Set params. More... | |
| void | SetParams (const ParamsMap ¶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) |
| void | ComputeHostId () |
| void | ComputeURL () |
Private Attributes | |
| std::string | pHostId |
| std::string | pProtocol |
| std::string | pUserName |
| std::string | pPassword |
| std::string | pHostName |
| int | pPort |
| std::string | pPath |
| ParamsMap | pParams |
| std::string | pURL |
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 | ( | ) |
|
private |
References pHostId, pHostName, pPassword, pPort, and pUserName.
Referenced by ParseHostInfo(), SetHostName(), SetPort(), and SetUserName().
|
private |
References GetPathWithParams(), IsValid(), pHostName, pPassword, pPort, pProtocol, pURL, and pUserName.
Referenced by ParsePath(), SetHostName(), SetParams(), SetPassword(), SetPath(), SetPort(), SetProtocol(), and SetUserName().
| 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, pURL, pUserName, and XrdCl::UtilityMsg.
Referenced by URL().
|
inline |
Get the host part of the URL (user:password@host:port)
References pHostId.
Referenced by XrdCl::FileSystem::AssignLoadBalancer(), BuildPrompt(), XrdCl::ThirdPartyCopyJob::CanDo(), XrdCl::Channel::Channel(), XrdCl::FileStateHandler::Close(), XrdCl::Stream::EnableLink(), XrdCl::XRootDMsgHandler::Examine(), XrdCl::PostMaster::GetChannel(), XrdCl::FileStateHandler::GetDataServer(), XrdCl::XRootDMsgHandler::HandleError(), XrdCl::Stream::MonitorDisconnection(), XrdCl::FileStateHandler::OnClose(), XrdCl::Stream::OnConnect(), XrdCl::FileStateHandler::OnOpen(), XrdCl::XRootDMsgHandler::OnStatusReady(), XrdCl::XRootDMsgHandler::OnStreamEvent(), XrdCl::XRootDMsgHandler::ParseResponse(), XrdCl::XRootDMsgHandler::Process(), XrdCl::FileStateHandler::Read(), XrdCl::XRootDMsgHandler::ReadRawRead(), XrdCl::XRootDMsgHandler::ReadRawReadV(), 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::UnPackReadVResponse(), 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::FileStateHandler::OnOpen(), XrdCl::FileStateHandler::OnStateRedirection(), XrdCl::FileStateHandler::Open(), XrdCl::XRootDMsgHandler::Process(), 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 ComputeURL(), 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().
|
inline |
Get the URL.
References pURL.
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::TimeOutRequests(), 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 ComputeURL(), XrdCl::XRootDMsgHandler::HandleError(), main(), XrdCl::FileStateHandler::Open(), XrdCl::XRootDMsgHandler::Process(), XrdCl::MessageUtils::SendMessage(), XrdCl::XRootDMsgHandler::SetLoadBalancer(), and UtilsTest::URLTest().
|
private |
References ComputeHostId(), pHostName, pPassword, pPort, pProtocol, and pUserName.
Referenced by FromString().
|
private |
References ComputeURL(), pPath, and SetParams().
Referenced by FromString().
|
inline |
Set the host name.
References ComputeHostId(), ComputeURL(), and pHostName.
| void XrdCl::URL::SetParams | ( | const std::string & | params | ) |
Set params.
References pParams, and XrdCl::Utils::splitString().
Referenced by XrdCl::ThirdPartyCopyJob::CanDo(), XrdCl::FileStateHandler::OnOpen(), XrdCl::FileStateHandler::OnStateRedirection(), ParsePath(), XrdCl::ClassicCopyJob::Run(), and XrdCl::ThirdPartyCopyJob::Run().
|
inline |
Set params.
References ComputeURL(), and pParams.
|
inline |
Set the password.
References ComputeURL(), and pPassword.
|
inline |
|
inline |
References ComputeHostId(), ComputeURL(), XrdMonCtrCollector::port, and pPort.
Referenced by PostMasterTest::MultiIPConnectionTest().
|
inline |
Set protocol.
References ComputeURL(), and pProtocol.
|
inline |
Set the username.
References ComputeHostId(), ComputeURL(), and pUserName.
|
private |
Referenced by Clear(), ComputeHostId(), and GetHostId().
|
private |
Referenced by Clear(), ComputeHostId(), ComputeURL(), FromString(), GetHostName(), GetLocation(), IsValid(), ParseHostInfo(), and SetHostName().
|
private |
Referenced by Clear(), GetParams(), GetParamsAsString(), and SetParams().
|
private |
Referenced by Clear(), ComputeHostId(), ComputeURL(), FromString(), GetPassword(), ParseHostInfo(), and SetPassword().
|
private |
Referenced by Clear(), FromString(), GetLocation(), GetPath(), GetPathWithParams(), IsValid(), ParsePath(), and SetPath().
|
private |
Referenced by Clear(), ComputeHostId(), ComputeURL(), FromString(), GetLocation(), GetPort(), ParseHostInfo(), and SetPort().
|
private |
Referenced by Clear(), ComputeURL(), FromString(), GetLocation(), GetProtocol(), IsValid(), ParseHostInfo(), and SetProtocol().
|
private |
Referenced by Clear(), ComputeURL(), FromString(), and GetURL().
|
private |
Referenced by Clear(), ComputeHostId(), ComputeURL(), FromString(), GetUserName(), ParseHostInfo(), and SetUserName().
1.8.3.1