33#ifndef I_BESServiceRegistry_h
34#define I_BESServiceRegistry_h 1
57class BESServiceRegistry :
public BESObj
60 typedef struct _service_cmd
62 std::string _description ;
63 std::map<std::string,std::string> _formats ;
65 static BESServiceRegistry * d_instance ;
66 mutable std::recursive_mutex d_cache_lock_mutex;
68 static void initialize_instance();
69 static void delete_instance();
71 std::map<std::string,std::map<std::string,service_cmd> >_services ;
72 std::map<std::string,std::map<std::string,std::string> > _handles ;
75 BESServiceRegistry() ;
76 virtual ~BESServiceRegistry() ;
78 virtual void add_service(
const std::string &name ) ;
80 const std::string &cmd,
81 const std::string &cmd_descript,
82 const std::string &format ) ;
83 virtual void add_format(
const std::string &service,
84 const std::string &cmd,
85 const std::string &format ) ;
90 const std::string &cmd =
"",
91 const std::string &format =
"" ) ;
94 const std::string &service ) ;
97 const std::string &service ) ;
99 std::list<std::string> &services ) ;
103 virtual void dump( std::ostream &strm )
const ;
105 static BESServiceRegistry * TheRegistry() ;
informational response object
top level BES object to house generic methods
virtual bool does_handle_service(const std::string &handler, const std::string &service)
Asks if the specified handler can handle the specified service.
virtual void services_handled(const std::string &handler, std::list< std::string > &services)
returns the list of servies provided by the handler in question
virtual bool service_available(const std::string &name, const std::string &cmd="", const std::string &format="")
Determines if a service and, optionally, a command and a return format, is available.
virtual void add_service(const std::string &name)
Add a service to the BES.
virtual void add_to_service(const std::string &service, const std::string &cmd, const std::string &cmd_descript, const std::string &format)
This function allows callers to add to a service that already exists.
virtual void show_services(BESInfo &info)
fills in the response object for the <showService /> request
virtual void handles_service(const std::string &handler, const std::string &service)
The specified handler can handle the specified service.
virtual void add_format(const std::string &service, const std::string &cmd, const std::string &format)
add a format response to a command of a service
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual void remove_service(const std::string &name)
remove a service from the BES