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

  1 karl  1.52 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.15 //
  3 karl  1.44 // 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 karl  1.37 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.44 // 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.46 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.52 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.15 //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 mike  1.17 // 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 mike  1.15 // 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 kumpf 1.26 // 
 21 mike  1.17 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.15 // 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 mike  1.17 // 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 mike  1.15 // 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            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_Server_h
 35            #define Pegasus_Server_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 kumpf 1.28 #include <Pegasus/Common/InternalException.h>
 39 kumpf 1.58 #include <Pegasus/Common/Monitor.h>
 40 kumpf 1.30 #include <Pegasus/Common/SSLContext.h>
 41 dave.sudlik 1.51 #include <Pegasus/Repository/CIMRepository.h>
 42 kumpf       1.53 #include <Pegasus/ProviderManager2/Default/ProviderMessageHandler.h>
 43                  #include <Pegasus/Server/CIMServerState.h>
 44                  #include <Pegasus/Server/HTTPAuthenticatorDelegator.h>
 45                  #include <Pegasus/Server/Linkage.h>
 46 kumpf       1.30 
 47 mike        1.15 PEGASUS_NAMESPACE_BEGIN
 48 dave.sudlik 1.57 // Routine to unregister Pegasus with external slp
 49                  #ifdef PEGASUS_SLP_REG_TIMEOUT
 50                   void PEGASUS_SERVER_LINKAGE unregisterPegasusFromSLP();
 51                  #endif
 52 mike        1.15 
 53                  struct ServerRep;
 54 mike        1.17 
 55                  class CIMOperationRequestDispatcher;
 56                  class CIMOperationResponseEncoder;
 57                  class CIMOperationRequestDecoder;
 58 kumpf       1.18 class CIMOperationRequestAuthorizer;
 59 mike        1.17 class CIMExportRequestDispatcher;
 60                  class CIMExportResponseEncoder;
 61                  class CIMExportRequestDecoder;
 62                  class HTTPAcceptor;
 63 kumpf       1.25 class CIMRepository;
 64 mike        1.15 
 65 kumpf       1.30 class ModuleController;
 66 kumpf       1.22 class IndicationHandlerService;
 67                  class IndicationService;
 68 chip        1.21 class ProviderManagerService;
 69 kumpf       1.25 class ProviderRegistrationManager;
 70 mday        1.32 class BinaryMessageHandler;
 71 nag.boranna 1.48 class SSLContextManager;
 72 mday        1.32 
 73 chip        1.21 
 74 mike        1.15 class PEGASUS_SERVER_LINKAGE CIMServer
 75                  {
 76                  public:
 77                  
 78                      enum Protocol { PROPRIETARY, STANDARD };
 79 kumpf       1.45 
 80 mike        1.15     /** Constructor - Creates a CIMServer object.
 81                      */
 82 kumpf       1.58     CIMServer();
 83 mike        1.15 
 84                      ~CIMServer();
 85 mike        1.17 
 86 kumpf       1.31     /** Adds a connection acceptor for the specified listen socket.
 87 dave.sudlik 1.59         @param connectionType specifying whether the acceptor should
 88                                 listen on LOCAL_CONNECTION or IPV4_CONNECTION or
 89                                 IPV6_CONNECTION socket. portNumber is ignored if
 90                                 connectionType is LOCAL_CONNECTION.
 91 kumpf       1.31         @param portNumber Port number that should be used by the listener.
 92                                 This parameter is ignored if localConnection=true.
 93                          @param useSSL Boolean specifying whether SSL should be used for
 94                                 connections created by this acceptor.
 95                      */
 96                      void addAcceptor(
 97 dave.sudlik 1.59         Uint16 connectionType,
 98 kumpf       1.31         Uint32 portNumber,
 99 sushma.fernandes 1.54         Boolean useSSL);
100 kumpf            1.31 
101                           /** Bind the acceptors to the specified listen sockets.
102 kumpf            1.56         @exception - This function may receive exceptions from
103                               Channel specific subfunctions.
104 mike             1.15     */
105 kumpf            1.31     void bind();
106 mike             1.15 
107 a.arora          1.43     void tickle_monitor();
108                       
109 mike             1.15     /** runForever Main runloop for the server.
110                           */
111                           void runForever();
112                       
113 mike             1.17     /** Call to gracefully shutdown the server.  The server connection socket
114                               will be closed to disable new connections from clients.
115                           */
116 chip             1.21     void stopClientConnection();
117 mike             1.17 
118                           /** Call to gracefully shutdown the server.  It is called when the server
119 chip             1.21         has been stopped and is ready to be shutdown.  Next time runForever()
120 mike             1.17         is called, the server shuts down.
121 mike             1.15     */
122 mike             1.17     void shutdown();
123                       
124 carolann.graves  1.50     /** Returns true if the server is in the process of shutting down,
125                               false otherwise.
126 mike             1.17     */
127                           Boolean terminated() { return _dieNow; };
128                       
129 chip             1.21     /** Call to resume the sever.
130 mike             1.17     */
131                           void resume();
132                       
133 chip             1.21     /** Call to set the CIMServer state.  Also inform the appropriate
134 mike             1.17         message queues about the current state of the CIMServer.
135                           */
136                           void setState(Uint32 state);
137                       
138                           Uint32 getOutstandingRequestCount();
139                       
140 s.hills          1.36     /** Signal to shutdown
141                           */
142 a.arora          1.43     static void shutdownSignal();
143 s.hills          1.36 
144 tony             1.42     /** startSLPProvider is a temporary function to get this
145                               provider started as part of system startup.
146                               This MUST be replaced with something more permanent.
147                           */
148                           void startSLPProvider();
149                       
150 yi.zhou          1.55     /**
151                               This function gets the current environment variables, the current
152                               configuration properties, and the currently registered provider
153                               modules whent the CIM Server starts with the configuration
154 kumpf            1.56         property "enableAuditLog" set to true.
155 yi.zhou          1.55     */
156                           static void auditLogInitializeCallback();
157                       
158 mike             1.15 private:
159 mike             1.17     Boolean _dieNow;
160                       
161 tony             1.42 #ifdef PEGASUS_ENABLE_SLP
162                           Boolean _runSLP;
163                       #endif
164                       
165 kumpf            1.58     AutoPtr<Monitor> _monitor;
166 kumpf            1.25     CIMRepository* _repository;
167 mike             1.17     CIMOperationRequestDispatcher* _cimOperationRequestDispatcher;
168                           CIMOperationResponseEncoder* _cimOperationResponseEncoder;
169                           CIMOperationRequestDecoder* _cimOperationRequestDecoder;
170 kumpf            1.18     CIMOperationRequestAuthorizer* _cimOperationRequestAuthorizer;
171 mike             1.17 
172                           CIMExportRequestDispatcher* _cimExportRequestDispatcher;
173                           CIMExportResponseEncoder* _cimExportResponseEncoder;
174                           CIMExportRequestDecoder* _cimExportRequestDecoder;
175 kumpf            1.30     HTTPAuthenticatorDelegator* _httpAuthenticatorDelegator;
176 mike             1.17 
177 kumpf            1.31     Array<HTTPAcceptor*> _acceptors;
178 kumpf            1.53     Array<ProviderMessageHandler*> _controlProviders;
179 kumpf            1.58     AutoPtr<CIMServerState> _serverState;
180 chip             1.21 
181 kumpf            1.30     ModuleController* _controlService;
182 kumpf            1.25     IndicationHandlerService* _handlerService;
183                           IndicationService* _indicationService;
184                           ProviderManagerService* _providerManager;
185                           ProviderRegistrationManager* _providerRegistrationManager;
186 kumpf            1.56     BinaryMessageHandler* _binaryMessageHandler;
187 nag.boranna      1.47     SSLContextManager* _sslContextMgr;
188 kumpf            1.56 
189                           void _init();
190 sushma.fernandes 1.54     SSLContext* _getSSLContext();
191 mike             1.15 };
192                       
193                       PEGASUS_NAMESPACE_END
194                       
195                       #endif /* Pegasus_Server_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2