Back to index

nordugrid-arc-nox  1.1.0~rc6
Service.h
Go to the documentation of this file.
00001 #ifndef __ARC_SERVICE_H__
00002 #define __ARC_SERVICE_H__
00003 
00004 #include <arc/ArcConfig.h>
00005 #include <arc/Logger.h>
00006 #include <arc/message/MCC.h>
00007 #include <arc/loader/Plugin.h>
00008 #include <arc/message/SecHandler.h>
00009 
00010 namespace Arc {
00011 
00013 
00033 class Service: public MCCInterface
00034 {
00035     protected:
00040         std::map<std::string,std::list<ArcSec::SecHandler*> > sechandlers_;
00041 
00043         static Logger logger;
00044 
00047         bool ProcessSecHandlers(Message& message,const std::string& label = "") const;
00048 
00049     public:
00051         Service(Config*);
00052 
00053         virtual ~Service(void) { };
00054 
00057         virtual void AddSecHandler(Config *cfg,ArcSec::SecHandler* sechandler,const std::string& label = "");
00058 
00064         virtual bool RegistrationCollector(XMLNode &doc);
00065 
00069         virtual std::string getID() { return ""; };
00070 };
00071 
00072 #define ServicePluginKind ("HED:SERVICE")
00073 
00074 class ServicePluginArgument: public PluginArgument {
00075     private:
00076         Config* config_;
00077         ChainContext* context_;
00078     public:
00079         ServicePluginArgument(Config* config,ChainContext* context):config_(config),context_(context) { };
00080         virtual ~ServicePluginArgument(void) { };
00081         operator Config* (void) { return config_; };
00082         operator ChainContext* (void) { return context_; };
00083 };
00084 
00085 } // namespace Arc
00086 
00087 #endif /* __ARC_SERVICE_H__ */