(file) Return to OOPProviderManagerRouter.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2

  1 karl  1.4 //%2005////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1 //
  3 karl  1.2 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 kumpf 1.1 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.2 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.4 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 kumpf 1.1 //
 12           // Permission is hereby granted, free of charge, to any person obtaining a copy
 13           // of this software and associated documentation files (the "Software"), to
 14           // deal in the Software without restriction, including without limitation the
 15           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16           // sell copies of the Software, and to permit persons to whom the Software is
 17           // furnished to do so, subject to the following conditions:
 18 karl  1.2 // 
 19 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27           //
 28           //==============================================================================
 29           //
 30           // Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 31           //         Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com)
 32           //
 33           // Modified By:
 34           //
 35           //%/////////////////////////////////////////////////////////////////////////////
 36           
 37           #ifndef Pegasus_OOPProviderManagerRouter_h
 38           #define Pegasus_OOPProviderManagerRouter_h
 39           
 40 kumpf 1.1 #include <Pegasus/Common/Config.h>
 41           #include <Pegasus/Common/String.h>
 42           #include <Pegasus/Common/HashTable.h>
 43           #include <Pegasus/Common/CIMMessage.h>
 44           #include <Pegasus/Common/IPC.h>
 45           
 46           #include <Pegasus/ProviderManager2/ProviderManagerRouter.h>
 47           #include <Pegasus/ProviderManager2/ProviderManager.h>
 48           #include <Pegasus/ProviderManager2/Linkage.h>
 49           
 50           PEGASUS_NAMESPACE_BEGIN
 51           
 52           class ProviderAgentContainer;
 53           
 54           typedef HashTable<String, ProviderAgentContainer*, EqualFunc<String>,
 55               HashFunc<String> > ProviderAgentTable;
 56           
 57           class PEGASUS_PPM_LINKAGE OOPProviderManagerRouter
 58               : public ProviderManagerRouter
 59           {
 60           public:
 61 kumpf 1.1     OOPProviderManagerRouter(PEGASUS_INDICATION_CALLBACK indicationCallback);
 62           
 63               virtual ~OOPProviderManagerRouter();
 64           
 65               virtual Message* processMessage(Message* message);
 66           
 67               virtual Boolean hasActiveProviders();
 68               virtual void unloadIdleProviders();
 69           
 70           private:
 71               //
 72               // Private methods
 73               //
 74           
 75               /** Unimplemented */
 76               OOPProviderManagerRouter();
 77               /** Unimplemented */
 78               OOPProviderManagerRouter(const OOPProviderManagerRouter&);
 79               /** Unimplemented */
 80               OOPProviderManagerRouter& operator=(const OOPProviderManagerRouter&);
 81           
 82 kumpf 1.1     /**
 83                   Return a pointer to the ProviderAgentContainer for the specified
 84 kumpf 1.3         moduleName and userName.  If no ProviderAgentContainer exists for
 85                   this moduleName/userName pair, one is created in an uninitialized
 86                   state.
 87 kumpf 1.1      */
 88 kumpf 1.3     ProviderAgentContainer* _lookupProviderAgent(
 89                   const String& moduleName,
 90                   const String& userName);
 91           
 92               /**
 93                   Return an array of pointers to ProviderAgentContainers for the
 94                   specified moduleName.
 95                */
 96               Array<ProviderAgentContainer*> _lookupProviderAgents(
 97                   const String& moduleName);
 98 kumpf 1.1 
 99               /**
100                   Send the specified CIMRequestMessage to all initialized Provider
101                   Agents in the _providerAgentTable.
102                */
103               CIMResponseMessage* _forwardRequestToAllAgents(CIMRequestMessage* request);
104           
105               //
106               // Private data
107               //
108           
109               /**
110                   Callback function to which all generated indications are sent for
111                   processing.
112                */
113               PEGASUS_INDICATION_CALLBACK _indicationCallback;
114           
115               /**
116                   The _providerAgentTable contains a ProviderAgentContainer entry for
117                   each of the Provider Agent processes for which a request has been
118                   processed.  ProviderAgentContainer objects are persistent; once one
119 kumpf 1.1         is created it is never deleted.
120                */
121               ProviderAgentTable _providerAgentTable;
122               /**
123                   The _providerAgentTableMutex must be locked whenever the
124                   _providerAgentTable is accessed.
125                */
126               Mutex _providerAgentTableMutex;
127           };
128           
129           PEGASUS_NAMESPACE_END
130           
131           #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2