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