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 mike 1.17
51 class Monitor;
52 class CIMOperationRequestDispatcher;
53 class CIMOperationResponseEncoder;
54 class CIMOperationRequestDecoder;
|
55 kumpf 1.18 class CIMOperationRequestAuthorizer;
|
56 mike 1.17 class CIMExportRequestDispatcher;
57 class CIMExportResponseEncoder;
58 class CIMExportRequestDecoder;
59 class HTTPAcceptor;
|
60 kumpf 1.25 class CIMRepository;
|
61 mike 1.15
|
62 kumpf 1.30 class ModuleController;
|
63 kumpf 1.22 class IndicationHandlerService;
64 class IndicationService;
|
65 chip 1.21 class ProviderManagerService;
|
66 kumpf 1.25 class ProviderRegistrationManager;
|
67 mday 1.32 class BinaryMessageHandler;
|
68 nag.boranna 1.48 class SSLContextManager;
|
69 mday 1.32
|
70 chip 1.21
|
71 mike 1.15 class PEGASUS_SERVER_LINKAGE CIMServer
72 {
73 public:
74
75 enum Protocol { PROPRIETARY, STANDARD };
|
76 kumpf 1.45
|
77 mike 1.15 /** Constructor - Creates a CIMServer object.
78 The CIM Server objects establishes a repository object,
79 a dispatcher object, and creates a channnel factory and
80 acceptor for the Server.
|
81 mike 1.17 @param monitor monitor object for the server.
|
82 mike 1.15 @exception - ATTN
83 */
|
84 kumpf 1.31 CIMServer(Monitor* monitor);
|
85 mike 1.15
86 ~CIMServer();
|
87 mike 1.17
|
88 kumpf 1.31 /** Adds a connection acceptor for the specified listen socket.
89 @param localConnection Boolean specifying whether the acceptor should
90 listen on a local-system-only connection.
91 @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 Boolean localConnection,
98 Uint32 portNumber,
|
99 sushma.fernandes 1.54 Boolean useSSL);
|
100 kumpf 1.31
101 /** Bind the acceptors to the specified listen sockets.
|
102 mike 1.15 @exception - This function may receive exceptions from
103 Channel specific subfunctions.
104 */
|
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 mike 1.15 private:
|
151 mike 1.17 Boolean _dieNow;
152
|
153 tony 1.42 #ifdef PEGASUS_ENABLE_SLP
154 Boolean _runSLP;
155 #endif
156
|
157 mike 1.17 Monitor* _monitor;
|
158 kumpf 1.25 CIMRepository* _repository;
|
159 mike 1.17 CIMOperationRequestDispatcher* _cimOperationRequestDispatcher;
160 CIMOperationResponseEncoder* _cimOperationResponseEncoder;
161 CIMOperationRequestDecoder* _cimOperationRequestDecoder;
|
162 kumpf 1.18 CIMOperationRequestAuthorizer* _cimOperationRequestAuthorizer;
|
163 mike 1.17
164 CIMExportRequestDispatcher* _cimExportRequestDispatcher;
165 CIMExportResponseEncoder* _cimExportResponseEncoder;
166 CIMExportRequestDecoder* _cimExportRequestDecoder;
|
167 kumpf 1.30 HTTPAuthenticatorDelegator* _httpAuthenticatorDelegator;
|
168 mike 1.17
|
169 kumpf 1.31 Array<HTTPAcceptor*> _acceptors;
|
170 kumpf 1.53 Array<ProviderMessageHandler*> _controlProviders;
|
171 a.arora 1.41 AutoPtr<CIMServerState> _serverState; //PEP101
|
172 chip 1.21
|
173 kumpf 1.30 ModuleController* _controlService;
|
174 kumpf 1.25 IndicationHandlerService* _handlerService;
175 IndicationService* _indicationService;
176 ProviderManagerService* _providerManager;
177 ProviderRegistrationManager* _providerRegistrationManager;
|
178 mday 1.32 BinaryMessageHandler *_binaryMessageHandler;
|
179 nag.boranna 1.47 SSLContextManager* _sslContextMgr;
|
180 mday 1.33
181 void _init(void);
|
182 sushma.fernandes 1.54 SSLContext* _getSSLContext();
|
183 mike 1.15 };
184
185 PEGASUS_NAMESPACE_END
186
187 #endif /* Pegasus_Server_h */
|