3 // $Id: AliHLTHOMERProxyHandler.h $
5 #ifndef ALIHLTHOMERPROXYHANDLER_H
6 #define ALIHLTHOMERPROXYHANDLER_H
8 /* This file is property of and copyright by the ALICE HLT Project *
9 * ALICE Experiment at CERN, All rights reserved. *
10 * See cxx source for full Copyright notice
13 /** @file AliHLTHOMERProxyHandler.h
14 @author Jochen Thaeder
16 @brief HOMER proxy handler for HomerManger
22 // -- -- -- -- -- -- --
23 #include "AliHLTHOMERSourceDesc.h"
24 // -- -- -- -- -- -- --
25 #include "AliHLTLoggingVariadicFree.h"
28 * @class AliHLTHOMERProxyHandler
29 * This Class should handle the communication with the proxy
30 * and fill the source list.
32 * @ingroup alihlt_homer
35 class AliHLTHOMERProxyHandler : public TObject, public AliHLTLogging
40 * ---------------------------------------------------------------------------------
41 * Constructor / Destructor
42 * ---------------------------------------------------------------------------------
46 AliHLTHOMERProxyHandler();
49 virtual ~AliHLTHOMERProxyHandler();
52 * @return 0 on success, <0 for failure
57 * ---------------------------------------------------------------------------------
58 * Source List - public
59 * ---------------------------------------------------------------------------------
62 /** Fill's source list, with entries
63 * @return 0 on success, <0 for failure, 1 for no active service
65 Int_t FillSourceList(TList *srcList);
67 ///////////////////////////////////////////////////////////////////////////////////
71 /** copy constructor prohibited */
72 AliHLTHOMERProxyHandler(const AliHLTHOMERProxyHandler&); // Not implemented.
74 /** assignment operator prohibited */
75 AliHLTHOMERProxyHandler& operator=(const AliHLTHOMERProxyHandler&); // Not implemented.
78 * ---------------------------------------------------------------------------------
80 * ---------------------------------------------------------------------------------
85 kHLT, /**< HLT realm */
86 kACR, /**< ACR realm */
87 kGPN, /**< GPN realm */
88 kKIP, /**< KIP realm */
89 kLoc, /**< Local realm. needs ssh tunnel */
90 kHOMERRealmsMax /**< Number of enum entries */
93 /** Array of proxy nodes per realm */
94 static const Char_t *fgkHOMERProxyNode[];
96 /** Indentifies the realm and sets it
97 * @return 0 on success, <0 for failure
102 * ---------------------------------------------------------------------------------
103 * Proxy Communication - private
104 * ---------------------------------------------------------------------------------
107 /** Get xmlrpc response from the proxy
108 * @return 0 on success, <0 for failure
110 Int_t RequestXmlRpcResponse();
112 /** process xmlrpc response and fill the source list
113 * @return 0 on success, <0 for failure, 1 for no active service
115 Int_t ProcessXmlRpcResponse();
118 * ---------------------------------------------------------------------------------
119 * Source Resolving - private
120 * ---------------------------------------------------------------------------------
123 /** Add a new Service to list
124 * @param xmlNode Ptr to service node
125 * @return 0 on sucess, <0 for failure
127 Int_t AddService(TXMLNode *innerNode);
130 * ---------------------------------------------------------------------------------
132 * ---------------------------------------------------------------------------------
135 /** Realm, which can be ACR, GPN, HLT, KIP */
136 Int_t fRealm; // see above
138 /** xmlRPC response */
139 TString fXmlRpcResponse; // see above
141 /** List to HOMER sources */
142 TList* fSourceList; //! transient
144 ClassDef(AliHLTHOMERProxyHandler, 0); // Handles HLT xml sources.