(file) Return to CIMListener.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Listener

  1 karl  1.40 //%2006////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1  //
  3 karl  1.25 // 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.12 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.25 // 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.28 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.40 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 kumpf 1.1  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15            // 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            // 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 karl  1.40 // 
 21 kumpf 1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22            // 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            // 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            // 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 tony  1.8  #include "CIMListener.h"
 35            #include <Pegasus/Common/Exception.h>
 36            #include <Pegasus/Common/SSLContext.h>
 37            #include <Pegasus/Common/Monitor.h>
 38 kumpf 1.1  #include <Pegasus/Common/HTTPAcceptor.h>
 39 kumpf 1.11 #include <Pegasus/Common/PegasusVersion.h>
 40 konrad.r 1.38 #include <Pegasus/Common/MessageLoader.h>
 41 kumpf    1.44 #include <Pegasus/Common/Time.h>
 42 kumpf    1.1  #include <Pegasus/ExportServer/CIMExportResponseEncoder.h>
 43               #include <Pegasus/ExportServer/CIMExportRequestDecoder.h>
 44 tony     1.8  #include <Pegasus/Consumer/CIMIndicationConsumer.h>
 45               #include <Pegasus/Listener/CIMListenerIndicationDispatcher.h>
 46               
 47               PEGASUS_NAMESPACE_BEGIN
 48 mike     1.41 
 49               ////////////////////////////////////////////////////////////////////////////////
 50               //
 51 tony     1.8  // CIMListenerService
 52 mike     1.41 //
 53               ////////////////////////////////////////////////////////////////////////////////
 54               
 55 tony     1.8  class CIMListenerService
 56               {
 57               public:
 58 mike     1.41     CIMListenerService(Uint32 portNumber, SSLContext * sslContext = NULL);
 59                   CIMListenerService(CIMListenerService & svc);
 60                   ~CIMListenerService();
 61               
 62                   void init();
 63               
 64                   /** bind to the port
 65                   */
 66                   void bind();
 67               
 68                   /** runForever Main runloop for the server.
 69                   */
 70                   void runForever();
 71               
 72                   /** Call to gracefully shutdown the server.  The server connection socket
 73                       will be closed to disable new connections from clients.
 74                   */
 75                   void stopClientConnection();
 76               
 77                   /** Call to gracefully shutdown the server.  It is called when the server
 78                       has been stopped and is ready to be shutdown.  Next time runForever()
 79 mike     1.41         is called, the server shuts down.
 80                   */
 81                   void shutdown();
 82               
 83                   /** Return true if the server has shutdown, false otherwise.
 84                   */
 85                   Boolean terminated() const
 86                   {
 87                       return _dieNow;
 88                   };
 89 david.dillard 1.34 
 90 mike          1.41     /** Call to resume the sever.
 91                        */
 92                        void resume();
 93                    
 94                        /** Call to set the CIMServer state.  Also inform the appropriate
 95                            message queues about the current state of the CIMServer.
 96                        */
 97                        void setState(Uint32 state);
 98                    
 99                        Uint32 getOutstandingRequestCount();
100                    
101                        /** Returns the indication listener dispatcher
102                        */
103                        CIMListenerIndicationDispatcher *getIndicationDispatcher() const;
104                    
105                        /** Returns the indication listener dispatcher
106                        */
107                        void setIndicationDispatcher(CIMListenerIndicationDispatcher* dispatcher);
108                    
109                        /** Returns the port number being used.
110                        */
111 mike          1.41     Uint32 getPortNumber() const;
112                    
113 mike          1.42     static ThreadReturnType PEGASUS_THREAD_CDECL 
114 mike          1.41     _listener_routine(void *param);
115 tony          1.8  
116                    private:
117 mike          1.41     Uint32 _portNumber;
118                        SSLContext *_sslContext;
119                        Monitor *_monitor;
120                        Mutex _monitorMutex;
121                        HTTPAcceptor *_acceptor;
122                        Boolean _dieNow;
123                        CIMListenerIndicationDispatcher *_dispatcher;
124                        CIMExportResponseEncoder *_responseEncoder;
125                        CIMExportRequestDecoder *_requestDecoder;
126 tony          1.8  };
127                    
128 mike          1.41 CIMListenerService::CIMListenerService(
129                        Uint32 portNumber, 
130                        SSLContext * sslContext)
131                        :
132                        _portNumber(portNumber), 
133                        _sslContext(sslContext), 
134                        _monitor(NULL),
135                        _acceptor(NULL), 
136                        _dieNow(false), 
137                        _dispatcher(NULL), 
138                        _responseEncoder(NULL),
139                        _requestDecoder(NULL)
140 tony          1.8  {
141                    }
142                    
143 mike          1.41 CIMListenerService::CIMListenerService(CIMListenerService & svc) :
144                        _portNumber(svc._portNumber), 
145                        _sslContext(svc._sslContext), 
146                        _monitor(NULL),
147                        _acceptor(NULL), 
148                        _dieNow(svc._dieNow), 
149                        _dispatcher(NULL),
150                        _responseEncoder(NULL), 
151                        _requestDecoder(NULL)
152 tony          1.8  {
153                    }
154 mike          1.41 
155 tony          1.8  CIMListenerService::~CIMListenerService()
156                    {
157 kumpf         1.36     delete _responseEncoder;
158                        delete _requestDecoder;
159                        delete _acceptor;
160                        delete _monitor;
161 tony          1.8  }
162 kumpf         1.1  
163 tony          1.8  void CIMListenerService::init()
164 kumpf         1.1  {
165 mike          1.41     PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::init");
166 kumpf         1.1  
167 mike          1.41     if (NULL == _monitor)
168                            _monitor = new Monitor();
169 david.dillard 1.31 
170 mike          1.41     // _dispatcher = new CIMListenerIndicationDispatcher();
171 kumpf         1.1  
172 mike          1.41     if (NULL == _responseEncoder)
173                            _responseEncoder = new CIMExportResponseEncoder();
174 tony          1.8  
175 mike          1.41     if (NULL == _requestDecoder)
176                        {
177                            _requestDecoder = new CIMExportRequestDecoder(
178                                _dispatcher, _responseEncoder->getQueueId());
179                        }
180 kumpf         1.1  
181 mike          1.41     if (NULL == _acceptor)
182                        {
183                            _acceptor = new HTTPAcceptor(
184                                _monitor, _requestDecoder, false, _portNumber, _sslContext, false);
185                        }
186 kumpf         1.1  
187 mike          1.41     bind();
188                    
189                        PEG_METHOD_EXIT();
190 tony          1.8  }
191 david.dillard 1.34 
192 tony          1.8  void CIMListenerService::bind()
193                    {
194 mike          1.41     if (_acceptor != NULL)
195                        {
196                            _acceptor->bind();
197 kumpf         1.1  
198 mike          1.41         Logger::put(
199                                Logger::STANDARD_LOG, 
200                                System::CIMLISTENER,
201                                Logger::INFORMATION, 
202                                "Listening on HTTP port $0.",
203                                _portNumber);
204 chuck         1.20     }
205 tony          1.8  }
206 chuck         1.20 
207 tony          1.8  void CIMListenerService::runForever()
208                    {
209 mike          1.41     if (!_dieNow)
210 dj.gorey      1.14     {
211 kumpf         1.43         _monitor->run(500000);
212                            static struct timeval lastIdleCleanupTime = {0, 0};
213                            struct timeval now;
214 kumpf         1.44         Time::gettimeofday(&now);
215 kumpf         1.43         if (now.tv_sec - lastIdleCleanupTime.tv_sec > 300)
216 mike          1.41         {
217 kumpf         1.43             lastIdleCleanupTime.tv_sec = now.tv_sec;
218 mike          1.41             try
219                                {
220                                    MessageQueueService::get_thread_pool()->cleanupIdleThreads();
221                                }
222                                catch(...)
223                                {
224                                    // Ignore!
225                                }
226                            }
227 chuck         1.20     }
228 tony          1.8  }
229 kumpf         1.1  
230 tony          1.8  void CIMListenerService::shutdown()
231                    {
232                        PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::shutdown()");
233 kumpf         1.1  
234 mike          1.41     // This logic signals the thread currently executing _listener_routine()
235                        // to exit. That function deletes this instance of CIMListenerService, 
236                        // which deletes the _monitor member. We use a mutex to keep it from 
237                        // deleting the monitor until after tickle has been called.
238                        {
239                            AutoMutex am(_monitorMutex);
240                            _dieNow = true;
241                            _monitor->tickle();
242                        }
243 kumpf         1.1  
244 kumpf         1.4      PEG_METHOD_EXIT();
245 kumpf         1.1  }
246                    
247 tony          1.8  void CIMListenerService::resume()
248 kumpf         1.1  {
249 tony          1.8      PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::resume()");
250 kumpf         1.1  
251 mike          1.41     if (_acceptor != NULL)
252 tony          1.8          _acceptor->reopenConnectionSocket();
253 kumpf         1.1  
254 kumpf         1.4      PEG_METHOD_EXIT();
255 kumpf         1.1  }
256                    
257 tony          1.8  void CIMListenerService::stopClientConnection()
258 kumpf         1.1  {
259 mike          1.41     PEG_METHOD_ENTER(
260                            TRC_LISTENER,
261                            "CIMListenerService::stopClientConnection()");
262 kumpf         1.1  
263 kumpf         1.10     // tell Monitor to stop listening for client connections
264 chuck         1.22     _monitor->stopListeningForConnections(true);
265 kumpf         1.10 
266 mike          1.41     if (_acceptor != NULL)
267                            _acceptor->closeConnectionSocket();
268 kumpf         1.1  
269 kumpf         1.4      PEG_METHOD_EXIT();
270 kumpf         1.1  }
271                    
272 chuck         1.23 Uint32 CIMListenerService::getOutstandingRequestCount()
273                    {
274                        return _acceptor->getOutstandingRequestCount();
275                    }
276 tony          1.8  
277 mike          1.41 CIMListenerIndicationDispatcher* 
278                    CIMListenerService::getIndicationDispatcher() const
279 kumpf         1.1  {
280 david.dillard 1.32     return _dispatcher;
281 tony          1.8  }
282 david.dillard 1.34 
283 mike          1.41 void CIMListenerService::setIndicationDispatcher(
284                        CIMListenerIndicationDispatcher* dispatcher)
285 tony          1.8  {
286 david.dillard 1.32     _dispatcher = dispatcher;
287 kumpf         1.1  }
288                    
289 david.dillard 1.34 Uint32 CIMListenerService::getPortNumber() const
290                    {
291                        Uint32 portNumber = _portNumber;
292                    
293 mike          1.41     if ((portNumber == 0) && (_acceptor != 0))
294 david.dillard 1.34     {
295                            portNumber = _acceptor->getPortNumber();
296                        }
297                    
298 mike          1.41     return (portNumber);
299 david.dillard 1.34 }
300                    
301 mike          1.42 ThreadReturnType PEGASUS_THREAD_CDECL 
302 mike          1.41 CIMListenerService::_listener_routine(void *param)
303 kumpf         1.1  {
304 mike          1.41     CIMListenerService *svc = reinterpret_cast < CIMListenerService * >(param);
305 kumpf         1.1  
306 mike          1.41     try
307 david.dillard 1.32     {
308 mike          1.41         // svc->init(); bug 1394
309                            while (!svc->terminated())
310                            {
311 chuck         1.20 #if defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)
312 mike          1.41             pthread_testcancel();
313 chuck         1.20 #endif
314 mike          1.41             svc->runForever();
315                            }
316 david.dillard 1.32     }
317 mike          1.41     catch(...)
318                        {
319 konrad.r      1.37         Tracer::trace(TRC_SERVER, Tracer::LEVEL2,
320 mike          1.41                       "Unknown exception thrown in _listener_routine.");
321                        }
322                    
323                        // CAUTION: deleting the service also deletes the monitor whose tickle()
324                        // method may still be executing in another thread. This line of code was
325                        // most likely reached when the CIMListenerService::shutdown() method set
326                        // _dieNow to true and called Monitor::tickle(). We must wait until we
327                        // can obtain the _monitorMutex, indicating that we are no longer inside
328                        // Monitor::tickle().
329 mike          1.42     svc->_monitorMutex.lock();
330 mike          1.41     svc->_monitorMutex.unlock();
331                        delete svc;
332                    
333 david.dillard 1.32     return 0;
334 tony          1.8  }
335                    
336 mike          1.41 ////////////////////////////////////////////////////////////////////////////////
337                    //
338 tony          1.8  // CIMListenerRep
339 mike          1.41 //
340                    ////////////////////////////////////////////////////////////////////////////////
341                    
342 tony          1.8  class CIMListenerRep
343                    {
344                    public:
345 mike          1.41     CIMListenerRep(Uint32 portNumber, SSLContext * sslContext = NULL);
346                        ~CIMListenerRep();
347 tony          1.8  
348 mike          1.41     Uint32 getPortNumber() const;
349 tony          1.8  
350 mike          1.41     SSLContext *getSSLContext() const;
351                        void setSSLContext(SSLContext * sslContext);
352 david.dillard 1.31 
353 mike          1.41     void start();
354                        void stop();
355 tony          1.8  
356 mike          1.41     Boolean isAlive();
357 tony          1.8  
358 mike          1.41     Boolean addConsumer(CIMIndicationConsumer * consumer);
359                        Boolean removeConsumer(CIMIndicationConsumer * consumer);
360 tony          1.8  
361                    private:
362 mike          1.41     Boolean waitForPendingRequests(Uint32 shutdownTimeout);
363 chuck         1.23 
364 mike          1.41     Uint32 _portNumber;
365                        SSLContext *_sslContext;
366 tony          1.8  
367 mike          1.41     CIMListenerIndicationDispatcher *_dispatcher;
368                        ThreadPool *_thread_pool;
369                        CIMListenerService *_svc;
370                        Semaphore *_listener_sem;
371 tony          1.8  };
372                    
373 mike          1.41 CIMListenerRep::CIMListenerRep(
374                        Uint32 portNumber, 
375                        SSLContext * sslContext)
376                        :
377                        _portNumber(portNumber), 
378                        _sslContext(sslContext),
379                        _dispatcher(new CIMListenerIndicationDispatcher()), 
380                        _thread_pool(NULL),
381                        _svc(NULL), 
382                        _listener_sem(NULL)
383 tony          1.8  {
384                    }
385 david.dillard 1.31 
386 tony          1.8  CIMListenerRep::~CIMListenerRep()
387                    {
388 david.dillard 1.31     // if port is alive, clean up the port
389                        if (_thread_pool != 0)
390                        {
391                            // Block incoming export requests and unbind the port
392                            _svc->stopClientConnection();
393                    
394                            // Wait until pending export requests in the server are done.
395                            waitForPendingRequests(10);
396 chuck         1.23 
397 david.dillard 1.31         // Shutdown the CIMListenerService
398                            _svc->shutdown();
399                        }
400 chuck         1.20 
401                        delete _sslContext;
402                        delete _dispatcher;
403                        delete _thread_pool;
404                        delete _listener_sem;
405 tony          1.8  
406 mike          1.41     // don't delete _svc, this is deleted by _listener_routine
407 tony          1.8  }
408                    
409                    Uint32 CIMListenerRep::getPortNumber() const
410                    {
411 david.dillard 1.34     Uint32 portNumber;
412                    
413 mike          1.41     if (_svc == 0)
414 david.dillard 1.34         portNumber = _portNumber;
415 mike          1.41     else
416                            portNumber = _svc->getPortNumber();
417 david.dillard 1.34 
418                        return portNumber;
419 tony          1.8  }
420 kumpf         1.1  
421 mike          1.41 SSLContext *CIMListenerRep::getSSLContext() const
422 tony          1.8  {
423 david.dillard 1.31     return _sslContext;
424 kumpf         1.1  }
425 david.dillard 1.31 
426 mike          1.41 void CIMListenerRep::setSSLContext(SSLContext * sslContext)
427 tony          1.8  {
428 david.dillard 1.31     delete _sslContext;
429                        _sslContext = sslContext;
430                    }
431 kumpf         1.1  
432 tony          1.8  void CIMListenerRep::start()
433 kumpf         1.1  {
434 david.dillard 1.31     // spawn a thread to do this
435 mike          1.41     if (_thread_pool == 0)
436 chuck         1.20     {
437 mike          1.41         AutoPtr < CIMListenerService >
438                                svc(new CIMListenerService(_portNumber, _sslContext));
439 chuck         1.20 
440 david.dillard 1.31         svc->setIndicationDispatcher(_dispatcher);
441                            svc->init();
442 chuck         1.20 
443 mike          1.41         struct timeval deallocateWait = { 15, 0 };
444                            AutoPtr < ThreadPool >
445                                threadPool(new ThreadPool(0, "Listener", 0, 1, deallocateWait));
446                            AutoPtr < Semaphore > sem(new Semaphore(0));
447                    
448                            if (threadPool->allocate_and_awaken(
449                                svc.get(), CIMListenerService::_listener_routine, sem.get()) 
450                                != PEGASUS_THREAD_OK)
451                            {
452                                Logger::put(
453                                    Logger::STANDARD_LOG, System::CIMSERVER,
454                                    Logger::TRACE,
455                                    "Not enough threads to start CIMListernerService.");
456                    
457                                Tracer::trace(
458                                    TRC_SERVER, 
459                                    Tracer::LEVEL2,
460                                    "Could not allocate thread for "
461                                    "CIMListenerService::_listener_routine.");
462                                throw
463                                    Exception(MessageLoaderParms(
464 mike          1.41                     "Listener.CIMListener.CANNOT_ALLOCATE_THREAD",
465                                        "Could not allocate thread."));
466 konrad.r      1.38         }
467 mike          1.41 
468                            Logger::put(
469                                Logger::STANDARD_LOG, 
470                                System::CIMLISTENER,
471                                Logger::INFORMATION, 
472                                "CIMListener started");
473 david.dillard 1.31 
474                            _svc = svc.release();
475                            _thread_pool = threadPool.release();
476                            _listener_sem = sem.release();
477                        }
478 tony          1.8  }
479 kumpf         1.1  
480 tony          1.8  void CIMListenerRep::stop()
481                    {
482 mike          1.41     if (_thread_pool != NULL)
483 chuck         1.20     {
484 mike          1.41         // 
485                            // Graceful shutdown of the listener service
486                            // 
487                    
488                            // Block incoming export requests and unbind the port
489                            _svc->stopClientConnection();
490                    
491                            // Wait until pending export requests in the server are done.
492                            waitForPendingRequests(10);
493                    
494                            // Shutdown the CIMListenerService
495                            _svc->shutdown();
496 chuck         1.20 
497 mike          1.41         // Wait for the _listener_routine thread to exit.
498                            // The thread could be delivering an export, so give it 3sec.
499                            // Note that _listener_routine deletes the CIMListenerService,
500                            // so no need to delete _svc.
501                            try
502                            {
503                                _listener_sem->time_wait(3000);
504                            }
505                            catch(const TimeOut &)
506                            {
507                                // No need to do anything, the thread pool will be deleted below
508                                // to cancel the _listener_routine thread if it is still running.
509                            }
510 david.dillard 1.31 
511 mike          1.41         delete _listener_sem;
512                            _listener_sem = NULL;
513 chuck         1.20 
514 mike          1.41         // Delete the thread pool.  This cancels the listener thread if it is 
515                            // still
516                            // running.
517                            delete _thread_pool;
518                            _thread_pool = NULL;
519                    
520                            Logger::put(
521                                Logger::STANDARD_LOG, System::CIMLISTENER,
522                                Logger::INFORMATION, "CIMListener stopped");
523                        }
524 kumpf         1.1  }
525                    
526 tony          1.8  Boolean CIMListenerRep::isAlive()
527 kumpf         1.1  {
528 mike          1.41     return (_thread_pool != NULL) ? true : false;
529 tony          1.8  }
530 kumpf         1.1  
531 mike          1.41 Boolean CIMListenerRep::addConsumer(CIMIndicationConsumer * consumer)
532 tony          1.8  {
533 mike          1.41     return _dispatcher->addConsumer(consumer);
534 tony          1.8  }
535 mike          1.41 
536                    Boolean CIMListenerRep::removeConsumer(CIMIndicationConsumer * consumer)
537 tony          1.8  {
538 mike          1.41     return _dispatcher->removeConsumer(consumer);
539 tony          1.8  }
540 kumpf         1.1  
541 chuck         1.23 Boolean CIMListenerRep::waitForPendingRequests(Uint32 shutdownTimeout)
542                    {
543 mike          1.41     // Wait for 10 sec max
544                        Uint32 reqCount;
545                        Uint32 countDown = shutdownTimeout * 10;
546                    
547                        for (; countDown > 0; countDown--)
548                        {
549                            reqCount = _svc->getOutstandingRequestCount();
550                            if (reqCount > 0)
551 mike          1.42             Threads::sleep(100);
552 mike          1.41         else
553                                return true;
554                        }
555 david.dillard 1.31 
556 mike          1.41     return false;
557 david.dillard 1.31 }
558 chuck         1.23 
559 tony          1.8  /////////////////////////////////////////////////////////////////////////////
560 mike          1.41 //
561 tony          1.8  // CIMListener
562 mike          1.41 //
563 tony          1.8  /////////////////////////////////////////////////////////////////////////////
564 mike          1.41 
565                    CIMListener::CIMListener(
566                        Uint32 portNumber, 
567                        SSLContext * sslContext) 
568                        :
569                        _rep(new CIMListenerRep(portNumber, sslContext))
570 tony          1.8  {
571                    }
572 mike          1.41 
573 tony          1.8  CIMListener::~CIMListener()
574                    {
575 mike          1.41     if (_rep != NULL)
576                            delete static_cast < CIMListenerRep * >(_rep);
577                        _rep = NULL;
578 tony          1.8  }
579 david.dillard 1.31 
580 tony          1.8  Uint32 CIMListener::getPortNumber() const
581                    {
582 mike          1.41     return static_cast < CIMListenerRep * >(_rep)->getPortNumber();
583 kumpf         1.1  }
584                    
585 mike          1.41 SSLContext *CIMListener::getSSLContext() const
586 tony          1.8  {
587 mike          1.41     return static_cast < CIMListenerRep * >(_rep)->getSSLContext();
588 tony          1.8  }
589 mike          1.41 
590                    void CIMListener::setSSLContext(SSLContext * sslContext)
591 tony          1.8  {
592 mike          1.41     static_cast < CIMListenerRep * >(_rep)->setSSLContext(sslContext);
593 tony          1.8  }
594 mike          1.41 
595 tony          1.8  void CIMListener::start()
596 kumpf         1.1  {
597 mike          1.41     static_cast < CIMListenerRep * >(_rep)->start();
598 tony          1.8  }
599 mike          1.41 
600 tony          1.8  void CIMListener::stop()
601                    {
602 mike          1.41     static_cast < CIMListenerRep * >(_rep)->stop();
603 tony          1.8  }
604 kumpf         1.1  
605 aruran.ms     1.35 Boolean CIMListener::isAlive() const
606 tony          1.8  {
607 mike          1.41     return static_cast < CIMListenerRep * >(_rep)->isAlive();
608 tony          1.8  }
609 kumpf         1.1  
610 mike          1.41 Boolean CIMListener::addConsumer(CIMIndicationConsumer * consumer)
611 tony          1.8  {
612 mike          1.41     return static_cast < CIMListenerRep * >(_rep)->addConsumer(consumer);
613 tony          1.8  }
614 mike          1.41 
615                    Boolean CIMListener::removeConsumer(CIMIndicationConsumer * consumer)
616 tony          1.8  {
617 mike          1.41     return static_cast < CIMListenerRep * >(_rep)->removeConsumer(consumer);
618 kumpf         1.1  }
619                    
620                    PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2