xrootd
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TPC::TPCHandler Class Reference

#include <XrdTpcTPC.hh>

Inheritance diagram for TPC::TPCHandler:
Inheritance graph
[legend]
Collaboration diagram for TPC::TPCHandler:
Collaboration graph
[legend]

Classes

struct  TPCLogRecord
 

Public Member Functions

 TPCHandler (XrdSysError *log, const char *config, XrdOucEnv *myEnv)
 
virtual ~TPCHandler ()
 
virtual bool MatchesPath (const char *verb, const char *path)
 Tells if the incoming path is recognized as one of the paths that have to be processed.
 
virtual int ProcessReq (XrdHttpExtReq &req)
 
virtual int Init (const char *cfgfile)
 Initializes the external request handler.
 
- Public Member Functions inherited from XrdHttpExtHandler
 XrdHttpExtHandler ()
 Constructor.
 
virtual ~XrdHttpExtHandler ()
 Destructor.
 

Private Member Functions

int ProcessOptionsReq (XrdHttpExtReq &req)
 
void ConfigureCurlCA (CURL *curl)
 
int RedirectTransfer (CURL *curl, const std::string &redirect_resource, XrdHttpExtReq &req, XrdOucErrInfo &error, TPCLogRecord &)
 
int OpenWaitStall (XrdSfsFile &fh, const std::string &resource, int mode, int openMode, const XrdSecEntity &sec, const std::string &authz)
 
int RunCurlBasic (CURL *curl, XrdHttpExtReq &req, TPC::State &state, TPCLogRecord &rec)
 
int ProcessPushReq (const std::string &resource, XrdHttpExtReq &req)
 
int ProcessPullReq (const std::string &resource, XrdHttpExtReq &req)
 
bool ConfigureFSLib (XrdOucStream &Config, std::string &path1, bool &path1_alt, std::string &path2, bool &path2_alt)
 
bool Configure (const char *configfn, XrdOucEnv *myEnv)
 
bool ConfigureLogger (XrdOucStream &Config)
 
void logTransferEvent (LogMask lvl, const TPCLogRecord &record, const std::string &event, const std::string &message="")
 

Static Private Member Functions

static int sockopt_setcloexec_callback (void *clientp, curl_socket_t curlfd, curlsocktype purpose)
 
static int opensocket_callback (void *clientp, curlsocktype purpose, struct curl_sockaddr *address)
 
static int closesocket_callback (void *clientp, curl_socket_t fd)
 
static std::string GetAuthz (XrdHttpExtReq &req)
 

Private Attributes

bool m_desthttps
 
int m_timeout
 
int m_first_timeout
 
std::string m_cadir
 
std::string m_cafile
 
XrdSysError m_log
 
XrdSfsFileSystemm_sfs
 
std::shared_ptr< XrdTlsTempCAm_ca_file
 
bool usingEC
 

Static Private Attributes

static int m_marker_period
 
static size_t m_block_size
 
static size_t m_small_block_size
 
static XrdSysMutex m_monid_mutex
 
static uint64_t m_monid
 
static const int m_pipelining_multiplier = 1
 

Constructor & Destructor Documentation

◆ TPCHandler()

TPC::TPCHandler::TPCHandler ( XrdSysError log,
const char *  config,
XrdOucEnv myEnv 
)

◆ ~TPCHandler()

virtual TPC::TPCHandler::~TPCHandler ( )
virtual

Member Function Documentation

◆ closesocket_callback()

static int TPC::TPCHandler::closesocket_callback ( void *  clientp,
curl_socket_t  fd 
)
staticprivate

◆ Configure()

bool TPC::TPCHandler::Configure ( const char *  configfn,
XrdOucEnv myEnv 
)
private

◆ ConfigureCurlCA()

void TPC::TPCHandler::ConfigureCurlCA ( CURL curl)
private

◆ ConfigureFSLib()

bool TPC::TPCHandler::ConfigureFSLib ( XrdOucStream Config,
std::string &  path1,
bool &  path1_alt,
std::string &  path2,
bool &  path2_alt 
)
private

◆ ConfigureLogger()

bool TPC::TPCHandler::ConfigureLogger ( XrdOucStream Config)
private

◆ GetAuthz()

static std::string TPC::TPCHandler::GetAuthz ( XrdHttpExtReq req)
staticprivate

◆ Init()

virtual int TPC::TPCHandler::Init ( const char *  cfgfile)
inlinevirtual

Initializes the external request handler.

Implements XrdHttpExtHandler.

◆ logTransferEvent()

void TPC::TPCHandler::logTransferEvent ( LogMask  lvl,
const TPCLogRecord record,
const std::string &  event,
const std::string &  message = "" 
)
private

◆ MatchesPath()

virtual bool TPC::TPCHandler::MatchesPath ( const char *  verb,
const char *  path 
)
virtual

Tells if the incoming path is recognized as one of the paths that have to be processed.

Implements XrdHttpExtHandler.

◆ opensocket_callback()

static int TPC::TPCHandler::opensocket_callback ( void *  clientp,
curlsocktype  purpose,
struct curl_sockaddr *  address 
)
staticprivate

◆ OpenWaitStall()

int TPC::TPCHandler::OpenWaitStall ( XrdSfsFile fh,
const std::string &  resource,
int  mode,
int  openMode,
const XrdSecEntity sec,
const std::string &  authz 
)
private

◆ ProcessOptionsReq()

int TPC::TPCHandler::ProcessOptionsReq ( XrdHttpExtReq req)
private

◆ ProcessPullReq()

int TPC::TPCHandler::ProcessPullReq ( const std::string &  resource,
XrdHttpExtReq req 
)
private

◆ ProcessPushReq()

int TPC::TPCHandler::ProcessPushReq ( const std::string &  resource,
XrdHttpExtReq req 
)
private

◆ ProcessReq()

virtual int TPC::TPCHandler::ProcessReq ( XrdHttpExtReq )
virtual

Process an HTTP request and send the response using the calling XrdHttpProtocol instance directly Returns 0 if ok, non0 if errors

Implements XrdHttpExtHandler.

◆ RedirectTransfer()

int TPC::TPCHandler::RedirectTransfer ( CURL curl,
const std::string &  redirect_resource,
XrdHttpExtReq req,
XrdOucErrInfo error,
TPCLogRecord  
)
private

◆ RunCurlBasic()

int TPC::TPCHandler::RunCurlBasic ( CURL curl,
XrdHttpExtReq req,
TPC::State state,
TPCLogRecord rec 
)
private

◆ sockopt_setcloexec_callback()

static int TPC::TPCHandler::sockopt_setcloexec_callback ( void *  clientp,
curl_socket_t  curlfd,
curlsocktype  purpose 
)
staticprivate

Member Data Documentation

◆ m_block_size

size_t TPC::TPCHandler::m_block_size
staticprivate

◆ m_ca_file

std::shared_ptr<XrdTlsTempCA> TPC::TPCHandler::m_ca_file
private

◆ m_cadir

std::string TPC::TPCHandler::m_cadir
private

◆ m_cafile

std::string TPC::TPCHandler::m_cafile
private

◆ m_desthttps

bool TPC::TPCHandler::m_desthttps
private

◆ m_first_timeout

int TPC::TPCHandler::m_first_timeout
private

◆ m_log

XrdSysError TPC::TPCHandler::m_log
private

◆ m_marker_period

int TPC::TPCHandler::m_marker_period
staticprivate

◆ m_monid

uint64_t TPC::TPCHandler::m_monid
staticprivate

◆ m_monid_mutex

XrdSysMutex TPC::TPCHandler::m_monid_mutex
staticprivate

◆ m_pipelining_multiplier

const int TPC::TPCHandler::m_pipelining_multiplier = 1
staticprivate

◆ m_sfs

XrdSfsFileSystem* TPC::TPCHandler::m_sfs
private

◆ m_small_block_size

size_t TPC::TPCHandler::m_small_block_size
staticprivate

◆ m_timeout

int TPC::TPCHandler::m_timeout
private

◆ usingEC

bool TPC::TPCHandler::usingEC
private

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