2 //=============================================================================
4 * @file Locator_XMLHandler.h
6 * @author Justin Michel <michel_j@ociweb.com>
8 //=============================================================================
10 #ifndef Locator_XMLHandler_H
11 #define Locator_XMLHandler_H
13 #include "ACEXML/common/DefaultHandler.h"
15 #include "Server_Info.h"
16 #include "Activator_Info.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 class XML_Backing_Store
;
26 * Callback SAX XML Handler for parsing Locator XML.
28 class Locator_XMLHandler
: public ACEXML_DefaultHandler
31 typedef std::pair
<ACE_CString
, ACE_CString
> NameValue
;
32 typedef std::vector
<NameValue
> NameValues
;
34 static const ACE_TCHAR
* ROOT_TAG
;
35 static const ACE_TCHAR
* SERVER_INFO_TAG
;
36 static const ACE_TCHAR
* ENVIRONMENT_TAG
;
37 static const ACE_TCHAR
* ACTIVATOR_INFO_TAG
;
39 static const ACE_TCHAR
* SERVER_TAG
;
40 static const ACE_TCHAR
* POANAME_TAG
;
41 static const ACE_TCHAR
* JACORB_TAG
;
42 static const ACE_TCHAR
* ACTNAME_TAG
;
43 static const ACE_TCHAR
* CMDLINE_TAG
;
44 static const ACE_TCHAR
* DIR_TAG
;
45 static const ACE_TCHAR
* MODE_TAG
;
46 static const ACE_TCHAR
* LIMIT_TAG
;
47 static const ACE_TCHAR
* PARTIOR_TAG
;
48 static const ACE_TCHAR
* IOR_TAG
;
49 static const ACE_TCHAR
* STARTED_TAG
;
50 static const ACE_TCHAR
* PEER_TAG
;
51 static const ACE_TCHAR
* PID_TAG
;
52 static const ACE_TCHAR
* KEYNAME_TAG
;
53 static const ACE_TCHAR
* ALTKEY_TAG
;
58 bool operator==(const EnvVar
&) const; // To allow Vector explicit instantiation
59 bool operator!=(const EnvVar
&) const; // To allow Vector explicit instantiation
62 typedef std::vector
<EnvVar
> EnvList
;
63 typedef std::vector
<ACE_CString
> PeerList
;
66 /// @param repo the repo to update based on XML
67 Locator_XMLHandler (XML_Backing_Store
& repo
);
69 /// provide implementation for handling a new XML element
70 virtual void startElement (const ACEXML_Char
* namespaceURI
,
71 const ACEXML_Char
* localName
,
72 const ACEXML_Char
* qName
,
73 ACEXML_Attributes
* atts
);
75 /// provide implementation for handling terminating an XML element
76 virtual void endElement (const ACEXML_Char
* namespaceURI
,
77 const ACEXML_Char
* localName
,
78 const ACEXML_Char
* qName
);
82 XML_Backing_Store
& repo_
;
85 NameValues extra_params_
;
90 #endif /* Locator_XMLHandler_H */