Loading...
Searching...
No Matches
xrdcl_proxy::ProxyFactory Class Reference

XrdCl proxy prefix plugin factory. More...

`#include <ProxyPrefixPlugin.hh>`

Inheritance diagram for xrdcl_proxy::ProxyFactory:
Collaboration diagram for xrdcl_proxy::ProxyFactory:

## Public Member Functions

| ProxyFactory (const std::map< std::string, std::string > *config)
virtual | ~ProxyFactory ()
| Destructor.
virtual XrdCl::FilePlugIn * | CreateFile (const std::string &url)
| Create a file plug-in for the given URL.
virtual XrdCl::FileSystemPlugIn * | CreateFileSystem (const std::string &url)
| Create a file system plug-in for the given URL.
Public Member Functions inherited from XrdCl::PlugInFactory
virtual | ~PlugInFactory ()
| Destructor.

## Detailed Description

XrdCl proxy prefix plugin factory.

Definition at line 35 of file ProxyPrefixPlugin.hh.

## Constructor & Destructor Documentation

## ProxyFactory()

xrdcl_proxy::ProxyFactory::ProxyFactory | ( | const std::map< std::string, std::string > * | config | ) |

Construtor

Parameters

  config | map containing configuration parameters

Definition at line 50 of file ProxyPrefixPlugin.cc.

{
XrdCl::Log* log = XrdCl::DefaultEnv::GetLog();
// If any of the parameters specific to this plugin are present then export
// them as env variables to be used later on if not already set.
if (config) {
// When C++11 is here:
// std::list<std::string> lst_envs {"XROOT_PROXY", "xroot_proxy",
// "XROOT_PROXY_EXCL_DOMAINS",
// "xroot_proxy_excl_domains};
std::list<std::string> lst_envs;
lst_envs.push_back("XROOT_PROXY");
lst_envs.push_back("xroot_proxy");
lst_envs.push_back("XROOT_PROXY_EXCL_DOMAINS");
lst_envs.push_back("xroot_proxy_excl_domains");
for (std::list<std::string>::iterator it_env = lst_envs.begin();
it_env != lst_envs.end(); ++it_env) {
std::map<std::string, std::string>::const_iterator it_map =
config->find(*it_env);
if (it_map != config->end() && !it_map->second.empty()) {
if (setenv(it_map->first.c_str(), it_map->second.c_str(), 0)) {
log->Error(1, "Failed to set env variable %s from the configuration"
" file", it_map->first.c_str());
}
}
}
}
}
XrdCl::DefaultEnv::GetLog
static Log * GetLog()
Get default log.
Definition XrdClDefaultEnv.cc:493
XrdCl::Log::Error
void Error(uint64_t topic, const char *format,...)
Report an error.
Definition XrdClLog.cc:231

References XrdCl::Log::Error(), and XrdCl::DefaultEnv::GetLog().

Here is the call graph for this function:

## ~ProxyFactory()

xrdcl_proxy::ProxyFactory::~ProxyFactory | ( |  | ) |

virtual

Destructor.

Definition at line 84 of file ProxyPrefixPlugin.cc.

{}

## Member Function Documentation

## CreateFile()

XrdCl::FilePlugIn * xrdcl_proxy::ProxyFactory::CreateFile | ( | const std::string & | url | ) |

virtual

Create a file plug-in for the given URL.

Implements XrdCl::PlugInFactory.

Definition at line 90 of file ProxyPrefixPlugin.cc.

{
return static_cast<XrdCl::FilePlugIn*>(new ProxyPrefixFile());
}

## CreateFileSystem()

XrdCl::FileSystemPlugIn * xrdcl_proxy::ProxyFactory::CreateFileSystem | ( | const std::string & | url | ) |

virtual

Create a file system plug-in for the given URL.

Implements XrdCl::PlugInFactory.

Definition at line 99 of file ProxyPrefixPlugin.cc.

{
XrdCl::Log* log = XrdCl::DefaultEnv::GetLog();
log->Error(1, "FileSystem plugin implementation not supported");
return static_cast<XrdCl::FileSystemPlugIn*>(0);
}

References XrdCl::Log::Error(), and XrdCl::DefaultEnv::GetLog().

Here is the call graph for this function:

The documentation for this class was generated from the following files:

- ProxyPrefixPlugin.hh
- ProxyPrefixPlugin.cc