1 martin 1.7 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.8 //
|
3 martin 1.7 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.8 //
|
10 martin 1.7 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.8 //
|
17 martin 1.7 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.8 //
|
20 martin 1.7 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.8 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.7 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.8 //
|
28 martin 1.7 //////////////////////////////////////////////////////////////////////////
|
29 h.sterling 1.1 //
30 // Author: Heather Sterling (hsterl@us.ibm.com)
31 //
|
32 aruran.ms 1.2 // Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3654
|
33 h.sterling 1.1 //
34 //%/////////////////////////////////////////////////////////////////////////////
35
36 #ifndef Pegasus_ListenerService_h
37 #define Pegasus_ListenerService_h
38
39 #include <Pegasus/Common/Config.h>
40 #include <Pegasus/Common/ArrayInternal.h>
41 #include <Pegasus/Consumer/CIMIndicationConsumer.h>
42 #include <Pegasus/Common/System.h>
43 #include <Pegasus/Common/Monitor.h>
44 #include <Pegasus/Common/HTTPAcceptor.h>
45 #include <Pegasus/DynListener/Linkage.h>
46
47 #include <Pegasus/ExportServer/CIMExportResponseEncoder.h>
48 #include <Pegasus/ExportServer/CIMExportRequestDecoder.h>
49
50 #include "DynamicListenerIndicationDispatcher.h"
51 #include "ConsumerManager.h"
52
53 PEGASUS_NAMESPACE_BEGIN
54 h.sterling 1.1
55
56 class PEGASUS_DYNLISTENER_LINKAGE ListenerService
57 {
58 public:
59
60 ListenerService(ConsumerManager* consumerManager);
61
62 ~ListenerService();
63
64 ListenerService(const ListenerService& x);
65
|
66 venkat.puvvada 1.6 Boolean initializeListener(Uint32 portNumber, Boolean useSSL,
67 SSLContext* sslContext);
|
68 h.sterling 1.1
69 Boolean runListener();
70
71 Boolean shutdownListener();
72
|
73 aruran.ms 1.2 Boolean isAlive() const throw();
|
74 h.sterling 1.1
75 Uint32 getPortNumber() const;
76
|
77 mike 1.4 static ThreadReturnType PEGASUS_THREAD_CDECL _listener_routine(void *param);
|
78 h.sterling 1.1
|
79 mike 1.4 static ThreadReturnType PEGASUS_THREAD_CDECL _polling_routine(void *param);
|
80 h.sterling 1.1
81
82 private:
83
84 ConsumerManager* _consumerManager;
85 DynamicListenerIndicationDispatcher* _dispatcher;
86
87 Uint32 _portNumber;
88 Boolean _useSSL;
89 SSLContext* _sslContext;
90
|
91 venkat.puvvada 1.6 //ATTN: do we need to mutex the status? The consumer mgr takes
92 // care of synchronization ... but,
|
93 h.sterling 1.1 //maybe we should just in case someone uses it differently
94 Boolean _initialized;
95 Boolean _running;
96 Boolean _dieNow; //AtomicInt???
97 Semaphore* _shutdownSem;
98
99 Monitor* _monitor;
|
100 dave.sudlik 1.5
101 HTTPAcceptor *_ip6Acceptor;
102 HTTPAcceptor *_ip4Acceptor;
|
103 h.sterling 1.1
104 CIMExportResponseEncoder* _responseEncoder;
105 CIMExportRequestDecoder* _requestDecoder;
106
107 Uint32 _idleTimeout;
108 Boolean _neverUnload;
109
110 //listener thread
111 Thread* _listening_thread;
112
113 //polling thread
114 Thread* _polling_thread;
115
116 };
117
118 PEGASUS_NAMESPACE_END
119
120 #endif //Pegasus_ListenerService_h
121
122
123
124 h.sterling 1.1
125
|