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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2