URL representation.
More...
#include <XrdClURL.hh>
List of all members.
Public Types |
typedef std::map< std::string,
std::string > | ParamsMap |
Public Member Functions |
| | URL () |
| | Default constructor.
|
| | URL (const std::string &url) |
| bool | IsValid () const |
| | Is the url valid.
|
| std::string | GetURL () const |
| | Get the URL.
|
| std::string | GetHostId () const |
| | Get the host part of the URL (user:password@host:port)
|
| std::string | GetLocation () const |
| | Get protocol://host:port/path.
|
| const std::string & | GetProtocol () const |
| | Get the protocol.
|
| void | SetProtocol (const std::string &protocol) |
| | Set protocol.
|
| const std::string & | GetUserName () const |
| | Get the username.
|
| void | SetUserName (const std::string &userName) |
| | Set the username.
|
| const std::string & | GetPassword () const |
| | Get the password.
|
| void | SetPassword (const std::string &password) |
| | Set the password.
|
| const std::string & | GetHostName () const |
| | Get the name of the target host.
|
| void | SetHostName (const std::string &hostName) |
| | Set the host name.
|
| int | GetPort () const |
| | Get the target port.
|
| void | SetPort (int port) |
| const std::string & | GetPath () const |
| | Get the path.
|
| void | SetPath (const std::string &path) |
| | Set the path.
|
| std::string | GetPathWithParams () const |
| | Get the path with params.
|
| const ParamsMap & | GetParams () const |
| | Get the URL params.
|
| std::string | GetParamsAsString () const |
| | Get the URL params as string.
|
| void | SetParams (const std::string ¶ms) |
| | Set params.
|
| void | SetParams (const ParamsMap ¶ms) |
| | Set params.
|
| bool | FromString (const std::string &url) |
| | Parse a string and fill the URL fields.
|
| void | Clear () |
| | Clear the url.
|
Detailed Description
Member Typedef Documentation
Constructor & Destructor Documentation
| XrdCl::URL::URL |
( |
const std::string & |
url | ) |
|
Constructor
- Parameters:
-
| url | an url in format: protocol://user:password@host:port/path?param1=x¶m2=y |
References FromString().
Member Function Documentation
| void XrdCl::URL::Clear |
( |
| ) |
|
| void XrdCl::URL::ComputeHostId |
( |
| ) |
|
|
private |
| void XrdCl::URL::ComputeURL |
( |
| ) |
|
|
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().
| std::string XrdCl::URL::GetHostId |
( |
| ) |
const |
|
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().
| const std::string& XrdCl::URL::GetHostName |
( |
| ) |
const |
|
inline |
| std::string XrdCl::URL::GetLocation |
( |
| ) |
const |
| const ParamsMap& XrdCl::URL::GetParams |
( |
| ) |
const |
|
inline |
| std::string XrdCl::URL::GetParamsAsString |
( |
| ) |
const |
| const std::string& XrdCl::URL::GetPassword |
( |
| ) |
const |
|
inline |
| const std::string& XrdCl::URL::GetPath |
( |
| ) |
const |
|
inline |
| std::string XrdCl::URL::GetPathWithParams |
( |
| ) |
const |
| int XrdCl::URL::GetPort |
( |
| ) |
const |
|
inline |
| const std::string& XrdCl::URL::GetProtocol |
( |
| ) |
const |
|
inline |
| std::string XrdCl::URL::GetURL |
( |
| ) |
const |
|
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().
| const std::string& XrdCl::URL::GetUserName |
( |
| ) |
const |
|
inline |
| bool XrdCl::URL::IsValid |
( |
| ) |
const |
| bool XrdCl::URL::ParseHostInfo |
( |
const std::string |
hhostInfo | ) |
|
|
private |
| bool XrdCl::URL::ParsePath |
( |
const std::string & |
path | ) |
|
|
private |
| void XrdCl::URL::SetHostName |
( |
const std::string & |
hostName | ) |
|
|
inline |
| void XrdCl::URL::SetParams |
( |
const std::string & |
params | ) |
|
| void XrdCl::URL::SetParams |
( |
const ParamsMap & |
params | ) |
|
|
inline |
| void XrdCl::URL::SetPassword |
( |
const std::string & |
password | ) |
|
|
inline |
| void XrdCl::URL::SetPath |
( |
const std::string & |
path | ) |
|
|
inline |
| void XrdCl::URL::SetPort |
( |
int |
port | ) |
|
|
inline |
| void XrdCl::URL::SetProtocol |
( |
const std::string & |
protocol | ) |
|
|
inline |
| void XrdCl::URL::SetUserName |
( |
const std::string & |
userName | ) |
|
|
inline |
Member Data Documentation
| std::string XrdCl::URL::pHostId |
|
private |
| std::string XrdCl::URL::pHostName |
|
private |
| std::string XrdCl::URL::pPassword |
|
private |
| std::string XrdCl::URL::pPath |
|
private |
| std::string XrdCl::URL::pProtocol |
|
private |
| std::string XrdCl::URL::pURL |
|
private |
| std::string XrdCl::URL::pUserName |
|
private |
The documentation for this class was generated from the following files: