(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 mday  1.19 #include <Pegasus/Common/Cimom.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 Monitor;
 56                  class CIMOperationRequestDispatcher;
 57                  class CIMOperationResponseEncoder;
 58                  class CIMOperationRequestDecoder;
 59 kumpf       1.18 class CIMOperationRequestAuthorizer;
 60 mike        1.17 class CIMExportRequestDispatcher;
 61                  class CIMExportResponseEncoder;
 62                  class CIMExportRequestDecoder;
 63                  class HTTPAcceptor;
 64 kumpf       1.25 class CIMRepository;
 65 mike        1.15 
 66 kumpf       1.30 class ModuleController;
 67 kumpf       1.22 class IndicationHandlerService;
 68                  class IndicationService;
 69 chip        1.21 class ProviderManagerService;
 70 kumpf       1.25 class ProviderRegistrationManager;
 71 mday        1.32 class BinaryMessageHandler;
 72 nag.boranna 1.48 class SSLContextManager;
 73 mday        1.32 
 74 chip        1.21 
 75 mike        1.15 class PEGASUS_SERVER_LINKAGE CIMServer
 76                  {
 77                  public:
 78                  
 79                      enum Protocol { PROPRIETARY, STANDARD };
 80 kumpf       1.45 
 81 mike        1.15     /** Constructor - Creates a CIMServer object.
 82                          The CIM Server objects establishes a repository object,
 83                          a dispatcher object, and creates a channnel factory and
 84                          acceptor for the Server.
 85 kumpf       1.56         @param monitor monitor object for the server.
 86 mike        1.15         @exception - ATTN
 87                      */
 88 kumpf       1.31     CIMServer(Monitor* monitor);
 89 mike        1.15 
 90                      ~CIMServer();
 91 mike        1.17 
 92 kumpf       1.31     /** Adds a connection acceptor for the specified listen socket.
 93                          @param localConnection Boolean specifying whether the acceptor should
 94                                 listen on a local-system-only connection.
 95                          @param portNumber Port number that should be used by the listener.
 96                                 This parameter is ignored if localConnection=true.
 97                          @param useSSL Boolean specifying whether SSL should be used for
 98                                 connections created by this acceptor.
 99                      */
100                      void addAcceptor(
101                          Boolean localConnection,
102                          Uint32 portNumber,
103 sushma.fernandes 1.54         Boolean useSSL);
104 kumpf            1.31 
105                           /** Bind the acceptors to the specified listen sockets.
106 kumpf            1.56         @exception - This function may receive exceptions from
107                               Channel specific subfunctions.
108 mike             1.15     */
109 kumpf            1.31     void bind();
110 mike             1.15 
111 a.arora          1.43     void tickle_monitor();
112                       
113 mike             1.15     /** runForever Main runloop for the server.
114                           */
115                           void runForever();
116                       
117 mike             1.17     /** Call to gracefully shutdown the server.  The server connection socket
118                               will be closed to disable new connections from clients.
119                           */
120 chip             1.21     void stopClientConnection();
121 mike             1.17 
122                           /** Call to gracefully shutdown the server.  It is called when the server
123 chip             1.21         has been stopped and is ready to be shutdown.  Next time runForever()
124 mike             1.17         is called, the server shuts down.
125 mike             1.15     */
126 mike             1.17     void shutdown();
127                       
128 carolann.graves  1.50     /** Returns true if the server is in the process of shutting down,
129                               false otherwise.
130 mike             1.17     */
131                           Boolean terminated() { return _dieNow; };
132                       
133 chip             1.21     /** Call to resume the sever.
134 mike             1.17     */
135                           void resume();
136                       
137 chip             1.21     /** Call to set the CIMServer state.  Also inform the appropriate
138 mike             1.17         message queues about the current state of the CIMServer.
139                           */
140                           void setState(Uint32 state);
141                       
142                           Uint32 getOutstandingRequestCount();
143                       
144 s.hills          1.36     /** Signal to shutdown
145                           */
146 a.arora          1.43     static void shutdownSignal();
147 s.hills          1.36 
148 tony             1.42     /** startSLPProvider is a temporary function to get this
149                               provider started as part of system startup.
150                               This MUST be replaced with something more permanent.
151                           */
152                           void startSLPProvider();
153                       
154 yi.zhou          1.55     /**
155                               This function gets the current environment variables, the current
156                               configuration properties, and the currently registered provider
157                               modules whent the CIM Server starts with the configuration
158 kumpf            1.56         property "enableAuditLog" set to true.
159 yi.zhou          1.55     */
160                           static void auditLogInitializeCallback();
161                       
162 mike             1.15 private:
163 mike             1.17     Boolean _dieNow;
164                       
165 tony             1.42 #ifdef PEGASUS_ENABLE_SLP
166                           Boolean _runSLP;
167                       #endif
168                       
169 mike             1.17     Monitor* _monitor;
170 kumpf            1.25     CIMRepository* _repository;
171 mike             1.17     CIMOperationRequestDispatcher* _cimOperationRequestDispatcher;
172                           CIMOperationResponseEncoder* _cimOperationResponseEncoder;
173                           CIMOperationRequestDecoder* _cimOperationRequestDecoder;
174 kumpf            1.18     CIMOperationRequestAuthorizer* _cimOperationRequestAuthorizer;
175 mike             1.17 
176                           CIMExportRequestDispatcher* _cimExportRequestDispatcher;
177                           CIMExportResponseEncoder* _cimExportResponseEncoder;
178                           CIMExportRequestDecoder* _cimExportRequestDecoder;
179 kumpf            1.30     HTTPAuthenticatorDelegator* _httpAuthenticatorDelegator;
180 mike             1.17 
181 kumpf            1.31     Array<HTTPAcceptor*> _acceptors;
182 kumpf            1.53     Array<ProviderMessageHandler*> _controlProviders;
183 a.arora          1.41     AutoPtr<CIMServerState> _serverState; //PEP101
184 chip             1.21 
185 kumpf            1.30     ModuleController* _controlService;
186 kumpf            1.25     IndicationHandlerService* _handlerService;
187                           IndicationService* _indicationService;
188                           ProviderManagerService* _providerManager;
189                           ProviderRegistrationManager* _providerRegistrationManager;
190 kumpf            1.56     BinaryMessageHandler* _binaryMessageHandler;
191 nag.boranna      1.47     SSLContextManager* _sslContextMgr;
192 kumpf            1.56 
193                           void _init();
194 sushma.fernandes 1.54     SSLContext* _getSSLContext();
195 mike             1.15 };
196                       
197                       PEGASUS_NAMESPACE_END
198                       
199                       #endif /* Pegasus_Server_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2