Skip to content
Snippets Groups Projects
Commit e4af11f6 authored by Michael Davis's avatar Michael Davis
Browse files

[EOS-CTA] Removes XrdSsiCtaServiceProvider.h

Merged into XrdSsiCtaServiceProvider.cpp as it does not need to be
included anywhere else.
parent 2d16da24
Branches
Tags
No related merge requests found
......@@ -2,25 +2,66 @@
#include <iostream>
#endif
#include <XrdSsi/XrdSsiProvider.hh>
#include "XrdSsiPbAlert.hpp"
#include "XrdSsiPbService.hpp"
#include "XrdSsiCtaServiceProvider.h"
#include "eos/messages/eos_messages.pb.h"
/*!
* The service provider object is pointed to by the global pointer XrdSsiProviderServer.
* The Service Provider class.
*
* The shared object must define and set this at library load time (i.e. it is a file-level global
* static symbol). When the shared object is loaded, initialization fails if the appropriate symbol
* cannot be found or it is a null pointer.
* Instantiate a Service to process client requests.
*/
class XrdSsiCtaServiceProvider : public XrdSsiProvider
{
public:
XrdSsiCtaServiceProvider() {
#ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] XrdSsiCtaServiceProvider() constructor" << std::endl;
#endif
}
virtual ~XrdSsiCtaServiceProvider() {
#ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ~XrdSsiCtaServiceProvider() destructor" << std::endl;
#endif
}
//! Initialize the object for its intended use. This is always called before any other method.
bool Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, const std::string cfgFn, const std::string parms,
int argc, char **argv) override;
//! Called exactly once after initialisation to obtain an instance of an XrdSsiService object
XrdSsiService *GetService(XrdSsiErrInfo &eInfo, const std::string &contact, int oHold=256) override;
//! Determine resource availability. Can be called any time the client asks for the resource status.
XrdSsiProvider::rStat QueryResource(const char *rName, const char *contact=0) override;
};
/*!
* Global pointer to the Service Provider object.
*
* This must be defined at library load time (i.e. it is a file-level global static symbol). When the
* shared library is loaded, XRootD initialization fails if the appropriate symbol cannot be found (or
* it is a null pointer).
*/
XrdSsiProvider *XrdSsiProviderServer = new XrdSsiCtaServiceProvider;
/*!
* Initialise the Service Provider
*/
bool XrdSsiCtaServiceProvider::Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, const std::string cfgFn, const std::string parms, int argc, char **argv)
{
#ifdef XRDSSI_DEBUG
......@@ -34,6 +75,10 @@ bool XrdSsiCtaServiceProvider::Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, con
/*!
* Instantiate a Service object
*/
XrdSsiService* XrdSsiCtaServiceProvider::GetService(XrdSsiErrInfo &eInfo, const std::string &contact, int oHold)
{
#ifdef XRDSSI_DEBUG
......
#ifndef __XRD_SSI_CTA_SERVICE_PROVIDER_H
#define __XRD_SSI_CTA_SERVICE_PROVIDER_H
#include <XrdSsi/XrdSsiProvider.hh>
/*!
* The Service Provider is used by XRootD to process client requests
*/
class XrdSsiCtaServiceProvider : public XrdSsiProvider
{
public:
XrdSsiCtaServiceProvider() {
#ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] XrdSsiCtaServiceProvider() constructor" << std::endl;
#endif
}
virtual ~XrdSsiCtaServiceProvider() {
#ifdef XRDSSI_DEBUG
std::cout << "[DEBUG] ~XrdSsiCtaServiceProvider() destructor" << std::endl;
#endif
}
//! Initialize the object for its intended use. This is always called before any other method.
bool Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, const std::string cfgFn, const std::string parms, int argc, char **argv) override;
//! Called exactly once after initialisation to obtain an instance of an XrdSsiService object
XrdSsiService *GetService(XrdSsiErrInfo &eInfo, const std::string &contact, int oHold=256) override;
//! Determine resource availability. Can be called any time the client asks for the resource status.
XrdSsiProvider::rStat QueryResource(const char *rName, const char *contact=0) override;
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment