SOAPServers.h

00001 // $Id: SOAPServers.h 21 2010-09-05 04:18:17Z cschwarz1 $
00002 
00003 #ifndef BASE_SOAP_SOAPSERVERS_H
00004 #define BASE_SOAP_SOAPSERVERS_H
00005 
00006 #include <map>
00007 #include <vector>
00008 #include "libppbase/base/DateTime.h"
00009 #include "libppbase/base/Mutex.h"
00010 #include "SOAPException.h"
00011 
00012 namespace base_soap {
00014 
00018     class PPBASE_SOAP_EXPORT SOAPServers: public base::Mutex {
00019     public:
00021 
00024         SOAPServers();
00025 
00027 
00030         void config();
00031 
00033         static void deleteInstance();
00034 
00036 
00042         base::String getHost(const base::String &classname, const base::String &instance, size_t tryno = 0);
00043 
00045 
00049         static SOAPServers *getInstance();
00050 
00052 
00057         int getPort(const base::String &classname);
00058         
00059     private:
00060         base::DateTime                                      _fmtime;     
00061         base::String                                        _fname;      
00062         size_t                                              _fsize;      
00063         std::map<base::String, std::vector<base::String> >  _hosts;      
00064         static SOAPServers                                 *_instance;   
00065         std::map<base::String, int>                         _ports;      
00066     };
00067 }
00068 
00069 #endif