version 1.2, 2002/04/20 21:15:30
|
version 1.41.2.2, 2006/07/28 23:52:18
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
// Author: Dong Xiang, EMC Corporation (xiang_dong@emc.com) |
// | // |
// Modified By: |
// Modified By: Dan Gorey (djgorey@us.ibm.com) |
// Mike Day (mdday@us.ibm.com)s |
// Amit K Arora, IBM (amita@in.ibm.com) for PEP#183 |
// Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) |
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
// David Dillard, VERITAS Software Corp. |
// Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com) |
// (david.dillard@veritas.com) |
// Jenny Yu, Hewlett-Packard Company (jenny_yu@hp.com) |
// Vijay Eli, IBM (vijay.eli@in.ibm.com) for bug#3425 |
|
// Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3604 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include <Pegasus/Common/Config.h> |
#include "CIMListener.h" |
|
#include <Pegasus/Common/Exception.h> |
#include <iostream> |
#include <Pegasus/Common/SSLContext.h> |
#include <cassert> |
#include <Pegasus/Common/Monitor.h> |
#include <cstdio> |
|
#include <cctype> |
|
#include <ctime> |
|
#include <Pegasus/Common/FileSystem.h> |
|
#include <Pegasus/Common/HTTPAcceptor.h> | #include <Pegasus/Common/HTTPAcceptor.h> |
#include <Pegasus/Common/Tracer.h> |
|
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
|
#include <Pegasus/Common/MessageLoader.h> |
#include <Pegasus/Repository/CIMRepository.h> |
|
#include <Pegasus/ExportServer/CIMExportRequestDispatcher.h> |
|
#include <Pegasus/ExportServer/CIMExportResponseEncoder.h> | #include <Pegasus/ExportServer/CIMExportResponseEncoder.h> |
#include <Pegasus/ExportServer/CIMExportRequestDecoder.h> | #include <Pegasus/ExportServer/CIMExportRequestDecoder.h> |
|
#include <Pegasus/Consumer/CIMIndicationConsumer.h> |
|
#include <Pegasus/Listener/CIMListenerIndicationDispatcher.h> |
| |
#include "CIMListener.h" |
PEGASUS_NAMESPACE_BEGIN |
| |
#define DDD(X) // X |
//////////////////////////////////////////////////////////////////////////////// |
|
// |
|
// CIMListenerService |
|
// |
|
//////////////////////////////////////////////////////////////////////////////// |
| |
PEGASUS_USING_STD; |
class CIMListenerService |
|
{ |
|
public: |
|
CIMListenerService(Uint32 portNumber, SSLContext * sslContext = NULL); |
|
CIMListenerService(CIMListenerService & svc); |
|
~CIMListenerService(); |
|
|
|
void init(); |
|
|
|
/** bind to the port |
|
*/ |
|
void bind(); |
|
|
|
/** runForever Main runloop for the server. |
|
*/ |
|
void runForever(); |
|
|
|
/** Call to gracefully shutdown the server. The server connection socket |
|
will be closed to disable new connections from clients. |
|
*/ |
|
void stopClientConnection(); |
|
|
|
/** Call to gracefully shutdown the server. It is called when the server |
|
has been stopped and is ready to be shutdown. Next time runForever() |
|
is called, the server shuts down. |
|
*/ |
|
void shutdown(); |
|
|
|
/** Return true if the server has shutdown, false otherwise. |
|
*/ |
|
Boolean terminated() const |
|
{ |
|
return _dieNow; |
|
}; |
| |
PEGASUS_NAMESPACE_BEGIN |
/** Call to resume the sever. |
|
*/ |
|
void resume(); |
|
|
|
/** Call to set the CIMServer state. Also inform the appropriate |
|
message queues about the current state of the CIMServer. |
|
*/ |
|
void setState(Uint32 state); |
|
|
|
Uint32 getOutstandingRequestCount(); |
|
|
|
/** Returns the indication listener dispatcher |
|
*/ |
|
CIMListenerIndicationDispatcher *getIndicationDispatcher() const; |
|
|
|
/** Returns the indication listener dispatcher |
|
*/ |
|
void setIndicationDispatcher(CIMListenerIndicationDispatcher* dispatcher); |
|
|
|
/** Returns the port number being used. |
|
*/ |
|
Uint32 getPortNumber() const; |
|
|
|
static ThreadReturnType PEGASUS_THREAD_CDECL |
|
_listener_routine(void *param); |
|
|
|
private: |
|
Uint32 _portNumber; |
|
SSLContext *_sslContext; |
|
Monitor *_monitor; |
|
Mutex _monitorMutex; |
|
HTTPAcceptor *_acceptor; |
|
Boolean _dieNow; |
|
CIMListenerIndicationDispatcher *_dispatcher; |
|
CIMExportResponseEncoder *_responseEncoder; |
|
CIMExportRequestDecoder *_requestDecoder; |
|
}; |
|
|
|
CIMListenerService::CIMListenerService( |
|
Uint32 portNumber, |
|
SSLContext * sslContext) |
|
: |
|
_portNumber(portNumber), |
|
_sslContext(sslContext), |
|
_monitor(NULL), |
|
_acceptor(NULL), |
|
_dieNow(false), |
|
_dispatcher(NULL), |
|
_responseEncoder(NULL), |
|
_requestDecoder(NULL) |
|
{ |
|
} |
| |
CIMListener::CIMListener( |
CIMListenerService::CIMListenerService(CIMListenerService & svc) : |
Monitor* monitor, |
_portNumber(svc._portNumber), |
const String& rootPath, |
_sslContext(svc._sslContext), |
Boolean dynamicReg, |
_monitor(NULL), |
Boolean staticConsumers, |
_acceptor(NULL), |
Boolean persistence) |
_dieNow(svc._dieNow), |
: _dieNow(false), _rootPath(rootPath), |
_dispatcher(NULL), |
_dynamicReg(dynamicReg), |
_responseEncoder(NULL), |
_staticConsumers(staticConsumers), |
_requestDecoder(NULL) |
_persistence(persistence) |
|
{ | { |
const char METHOD_NAME[] = "CIMListener::CIMListener()"; |
} |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
CIMListenerService::~CIMListenerService() |
|
{ |
|
delete _responseEncoder; |
|
delete _requestDecoder; |
|
delete _acceptor; |
|
delete _monitor; |
|
} |
| |
// -- Save the monitor or create a new one: |
void CIMListenerService::init() |
|
{ |
|
PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::init"); |
| |
_monitor = monitor; |
if (NULL == _monitor) |
|
_monitor = new Monitor(); |
| |
// -- Create a CIMListenerState object: |
// _dispatcher = new CIMListenerIndicationDispatcher(); |
| |
_cimExportRequestDispatcher |
if (NULL == _responseEncoder) |
= new CIMExportRequestDispatcher(dynamicReg, staticConsumers, persistence); |
_responseEncoder = new CIMExportResponseEncoder(); |
| |
_cimExportResponseEncoder |
if (NULL == _requestDecoder) |
= new CIMExportResponseEncoder; |
{ |
|
_requestDecoder = new CIMExportRequestDecoder( |
|
_dispatcher, _responseEncoder->getQueueId()); |
|
} |
| |
_cimExportRequestDecoder = new CIMExportRequestDecoder( |
if (NULL == _acceptor) |
_cimExportRequestDispatcher, |
{ |
_cimExportResponseEncoder->getQueueId()); |
_acceptor = new HTTPAcceptor( |
|
_monitor, _requestDecoder, false, _portNumber, _sslContext, false); |
|
} |
| |
SSLContext * sslcontext = NULL; |
bind(); |
| |
_acceptor = new HTTPAcceptor(_monitor, _cimExportRequestDecoder, sslcontext); |
PEG_METHOD_EXIT(); |
|
} |
|
|
|
void CIMListenerService::bind() |
|
{ |
|
if (_acceptor != NULL) |
|
{ |
|
_acceptor->bind(); |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
Logger::put( |
|
Logger::STANDARD_LOG, |
|
System::CIMLISTENER, |
|
Logger::INFORMATION, |
|
"Listening on HTTP port $0.", |
|
_portNumber); |
|
} |
} | } |
| |
CIMListener::~CIMListener() |
void CIMListenerService::runForever() |
{ | { |
const char METHOD_NAME[] = "CIMListener::~CIMListener()"; |
static int modulator = 0; |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
if (!_dieNow) |
|
{ |
|
if (false == _monitor->run(500000)) |
|
{ |
|
modulator++; |
|
try |
|
{ |
|
MessageQueueService::get_thread_pool()->cleanupIdleThreads(); |
|
} |
|
catch(...) |
|
{ |
|
// Ignore! |
|
} |
|
} |
|
} |
|
} |
| |
// Note: do not delete the acceptor because it belongs to the Monitor |
void CIMListenerService::shutdown() |
// which takes care of disposing of it. |
{ |
|
PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::shutdown()"); |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
// This logic signals the thread currently executing _listener_routine() |
|
// to exit. That function deletes this instance of CIMListenerService, |
|
// which deletes the _monitor member. We use a mutex to keep it from |
|
// deleting the monitor until after tickle has been called. |
|
{ |
|
AutoMutex am(_monitorMutex); |
|
_dieNow = true; |
|
_monitor->tickle(); |
} | } |
| |
void CIMListener::bind(Uint32 port) |
PEG_METHOD_EXIT(); |
|
} |
|
|
|
void CIMListenerService::resume() |
{ | { |
const char METHOD_NAME[] = "CIMListener::bind()"; |
PEG_METHOD_ENTER(TRC_LISTENER, "CIMListenerService::resume()"); |
|
|
|
if (_acceptor != NULL) |
|
_acceptor->reopenConnectionSocket(); |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
PEG_METHOD_EXIT(); |
|
} |
| |
// not the best place to build the service url, but it works for now |
void CIMListenerService::stopClientConnection() |
// because the address string is accessible mdday |
{ |
|
PEG_METHOD_ENTER( |
|
TRC_LISTENER, |
|
"CIMListenerService::stopClientConnection()"); |
| |
_acceptor->bind(port); |
// tell Monitor to stop listening for client connections |
|
_monitor->stopListeningForConnections(true); |
|
|
|
if (_acceptor != NULL) |
|
_acceptor->closeConnectionSocket(); |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
PEG_METHOD_EXIT(); |
} | } |
| |
void CIMListener::runForever() |
Uint32 CIMListenerService::getOutstandingRequestCount() |
{ | { |
//ATTN: Do not add Trace code in this method. |
return _acceptor->getOutstandingRequestCount(); |
if(!_dieNow) |
|
_monitor->run(100); |
|
} | } |
| |
void CIMListener::stopClientConnection() |
CIMListenerIndicationDispatcher* |
|
CIMListenerService::getIndicationDispatcher() const |
{ | { |
const char METHOD_NAME[] = "CIMListener::stopClientConnection()"; |
return _dispatcher; |
|
} |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
void CIMListenerService::setIndicationDispatcher( |
|
CIMListenerIndicationDispatcher* dispatcher) |
|
{ |
|
_dispatcher = dispatcher; |
|
} |
| |
_acceptor->closeConnectionSocket(); |
Uint32 CIMListenerService::getPortNumber() const |
|
{ |
|
Uint32 portNumber = _portNumber; |
|
|
|
if ((portNumber == 0) && (_acceptor != 0)) |
|
{ |
|
portNumber = _acceptor->getPortNumber(); |
|
} |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
return (portNumber); |
} | } |
| |
void CIMListener::shutdown() |
ThreadReturnType PEGASUS_THREAD_CDECL |
|
CIMListenerService::_listener_routine(void *param) |
{ | { |
const char METHOD_NAME[] = "CIMListener::shutdown()"; |
CIMListenerService *svc = reinterpret_cast < CIMListenerService * >(param); |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
try |
|
{ |
|
// svc->init(); bug 1394 |
|
while (!svc->terminated()) |
|
{ |
|
#if defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU) |
|
pthread_testcancel(); |
|
#endif |
|
svc->runForever(); |
|
} |
|
} |
|
catch(...) |
|
{ |
|
Tracer::trace(TRC_SERVER, Tracer::LEVEL2, |
|
"Unknown exception thrown in _listener_routine."); |
|
} |
| |
_dieNow = true; |
// CAUTION: deleting the service also deletes the monitor whose tickle() |
|
// method may still be executing in another thread. This line of code was |
|
// most likely reached when the CIMListenerService::shutdown() method set |
|
// _dieNow to true and called Monitor::tickle(). We must wait until we |
|
// can obtain the _monitorMutex, indicating that we are no longer inside |
|
// Monitor::tickle(). |
|
svc->_monitorMutex.lock(); |
|
svc->_monitorMutex.unlock(); |
|
delete svc; |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
return 0; |
} | } |
| |
void CIMListener::resume() |
//////////////////////////////////////////////////////////////////////////////// |
|
// |
|
// CIMListenerRep |
|
// |
|
//////////////////////////////////////////////////////////////////////////////// |
|
|
|
class CIMListenerRep |
{ | { |
const char METHOD_NAME[] = "CIMListener::resume()"; |
public: |
|
CIMListenerRep(Uint32 portNumber, SSLContext * sslContext = NULL); |
|
~CIMListenerRep(); |
|
|
|
Uint32 getPortNumber() const; |
|
|
|
SSLContext *getSSLContext() const; |
|
void setSSLContext(SSLContext * sslContext); |
|
|
|
void start(); |
|
void stop(); |
|
|
|
Boolean isAlive(); |
|
|
|
Boolean addConsumer(CIMIndicationConsumer * consumer); |
|
Boolean removeConsumer(CIMIndicationConsumer * consumer); |
|
|
|
private: |
|
Boolean waitForPendingRequests(Uint32 shutdownTimeout); |
|
|
|
Uint32 _portNumber; |
|
SSLContext *_sslContext; |
|
|
|
CIMListenerIndicationDispatcher *_dispatcher; |
|
ThreadPool *_thread_pool; |
|
CIMListenerService *_svc; |
|
Semaphore *_listener_sem; |
|
}; |
|
|
|
CIMListenerRep::CIMListenerRep( |
|
Uint32 portNumber, |
|
SSLContext * sslContext) |
|
: |
|
_portNumber(portNumber), |
|
_sslContext(sslContext), |
|
_dispatcher(new CIMListenerIndicationDispatcher()), |
|
_thread_pool(NULL), |
|
_svc(NULL), |
|
_listener_sem(NULL) |
|
{ |
|
} |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
CIMListenerRep::~CIMListenerRep() |
|
{ |
|
// if port is alive, clean up the port |
|
if (_thread_pool != 0) |
|
{ |
|
// Block incoming export requests and unbind the port |
|
_svc->stopClientConnection(); |
| |
_acceptor->reopenConnectionSocket(); |
// Wait until pending export requests in the server are done. |
|
waitForPendingRequests(10); |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
// Shutdown the CIMListenerService |
|
_svc->shutdown(); |
} | } |
| |
CIMExportRequestDispatcher* CIMListener::getDispatcher() |
delete _sslContext; |
|
delete _dispatcher; |
|
delete _thread_pool; |
|
delete _listener_sem; |
|
|
|
// don't delete _svc, this is deleted by _listener_routine |
|
} |
|
|
|
Uint32 CIMListenerRep::getPortNumber() const |
{ | { |
const char METHOD_NAME[] = "CIMListener::getDispatcher()"; |
Uint32 portNumber; |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
if (_svc == 0) |
|
portNumber = _portNumber; |
|
else |
|
portNumber = _svc->getPortNumber(); |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
return portNumber; |
|
} |
| |
return _cimExportRequestDispatcher; |
SSLContext *CIMListenerRep::getSSLContext() const |
|
{ |
|
return _sslContext; |
|
} |
|
|
|
void CIMListenerRep::setSSLContext(SSLContext * sslContext) |
|
{ |
|
delete _sslContext; |
|
_sslContext = sslContext; |
|
} |
|
|
|
void CIMListenerRep::start() |
|
{ |
|
// spawn a thread to do this |
|
if (_thread_pool == 0) |
|
{ |
|
AutoPtr < CIMListenerService > |
|
svc(new CIMListenerService(_portNumber, _sslContext)); |
|
|
|
svc->setIndicationDispatcher(_dispatcher); |
|
svc->init(); |
|
|
|
struct timeval deallocateWait = { 15, 0 }; |
|
AutoPtr < ThreadPool > |
|
threadPool(new ThreadPool(0, "Listener", 0, 1, deallocateWait)); |
|
AutoPtr < Semaphore > sem(new Semaphore(0)); |
|
|
|
if (threadPool->allocate_and_awaken( |
|
svc.get(), CIMListenerService::_listener_routine, sem.get()) |
|
!= PEGASUS_THREAD_OK) |
|
{ |
|
Logger::put( |
|
Logger::STANDARD_LOG, System::CIMSERVER, |
|
Logger::TRACE, |
|
"Not enough threads to start CIMListernerService."); |
|
|
|
Tracer::trace( |
|
TRC_SERVER, |
|
Tracer::LEVEL2, |
|
"Could not allocate thread for " |
|
"CIMListenerService::_listener_routine."); |
|
throw |
|
Exception(MessageLoaderParms( |
|
"Listener.CIMListener.CANNOT_ALLOCATE_THREAD", |
|
"Could not allocate thread.")); |
|
} |
|
|
|
Logger::put( |
|
Logger::STANDARD_LOG, |
|
System::CIMLISTENER, |
|
Logger::INFORMATION, |
|
"CIMListener started"); |
|
|
|
_svc = svc.release(); |
|
_thread_pool = threadPool.release(); |
|
_listener_sem = sem.release(); |
|
} |
|
} |
|
|
|
void CIMListenerRep::stop() |
|
{ |
|
if (_thread_pool != NULL) |
|
{ |
|
// |
|
// Graceful shutdown of the listener service |
|
// |
|
|
|
// Block incoming export requests and unbind the port |
|
_svc->stopClientConnection(); |
|
|
|
// Wait until pending export requests in the server are done. |
|
waitForPendingRequests(10); |
|
|
|
// Shutdown the CIMListenerService |
|
_svc->shutdown(); |
|
|
|
// Wait for the _listener_routine thread to exit. |
|
// The thread could be delivering an export, so give it 3sec. |
|
// Note that _listener_routine deletes the CIMListenerService, |
|
// so no need to delete _svc. |
|
try |
|
{ |
|
_listener_sem->time_wait(3000); |
|
} |
|
catch(const TimeOut &) |
|
{ |
|
// No need to do anything, the thread pool will be deleted below |
|
// to cancel the _listener_routine thread if it is still running. |
|
} |
|
|
|
delete _listener_sem; |
|
_listener_sem = NULL; |
|
|
|
// Delete the thread pool. This cancels the listener thread if it is |
|
// still |
|
// running. |
|
delete _thread_pool; |
|
_thread_pool = NULL; |
|
|
|
Logger::put( |
|
Logger::STANDARD_LOG, System::CIMLISTENER, |
|
Logger::INFORMATION, "CIMListener stopped"); |
|
} |
|
} |
|
|
|
Boolean CIMListenerRep::isAlive() |
|
{ |
|
return (_thread_pool != NULL) ? true : false; |
|
} |
|
|
|
Boolean CIMListenerRep::addConsumer(CIMIndicationConsumer * consumer) |
|
{ |
|
return _dispatcher->addConsumer(consumer); |
|
} |
|
|
|
Boolean CIMListenerRep::removeConsumer(CIMIndicationConsumer * consumer) |
|
{ |
|
return _dispatcher->removeConsumer(consumer); |
|
} |
|
|
|
Boolean CIMListenerRep::waitForPendingRequests(Uint32 shutdownTimeout) |
|
{ |
|
// Wait for 10 sec max |
|
Uint32 reqCount; |
|
Uint32 countDown = shutdownTimeout * 10; |
|
|
|
for (; countDown > 0; countDown--) |
|
{ |
|
reqCount = _svc->getOutstandingRequestCount(); |
|
if (reqCount > 0) |
|
Threads::sleep(100); |
|
else |
|
return true; |
|
} |
|
|
|
return false; |
|
} |
|
|
|
///////////////////////////////////////////////////////////////////////////// |
|
// |
|
// CIMListener |
|
// |
|
///////////////////////////////////////////////////////////////////////////// |
|
|
|
CIMListener::CIMListener( |
|
Uint32 portNumber, |
|
SSLContext * sslContext) |
|
: |
|
_rep(new CIMListenerRep(portNumber, sslContext)) |
|
{ |
|
} |
|
|
|
CIMListener::~CIMListener() |
|
{ |
|
if (_rep != NULL) |
|
delete static_cast < CIMListenerRep * >(_rep); |
|
_rep = NULL; |
} | } |
| |
Uint32 CIMListener::getOutstandingRequestCount() |
Uint32 CIMListener::getPortNumber() const |
{ | { |
const char METHOD_NAME[] = "CIMListener::getOutstandingRequestCount()"; |
return static_cast < CIMListenerRep * >(_rep)->getPortNumber(); |
|
} |
|
|
|
SSLContext *CIMListener::getSSLContext() const |
|
{ |
|
return static_cast < CIMListenerRep * >(_rep)->getSSLContext(); |
|
} |
| |
PEG_FUNC_ENTER(TRC_SERVER, METHOD_NAME); |
void CIMListener::setSSLContext(SSLContext * sslContext) |
|
{ |
|
static_cast < CIMListenerRep * >(_rep)->setSSLContext(sslContext); |
|
} |
| |
PEG_FUNC_EXIT(TRC_SERVER, METHOD_NAME); |
void CIMListener::start() |
|
{ |
|
static_cast < CIMListenerRep * >(_rep)->start(); |
|
} |
| |
return (_acceptor->getOutstandingRequestCount()); |
void CIMListener::stop() |
|
{ |
|
static_cast < CIMListenerRep * >(_rep)->stop(); |
|
} |
|
|
|
Boolean CIMListener::isAlive() const |
|
{ |
|
return static_cast < CIMListenerRep * >(_rep)->isAlive(); |
|
} |
|
|
|
Boolean CIMListener::addConsumer(CIMIndicationConsumer * consumer) |
|
{ |
|
return static_cast < CIMListenerRep * >(_rep)->addConsumer(consumer); |
|
} |
|
|
|
Boolean CIMListener::removeConsumer(CIMIndicationConsumer * consumer) |
|
{ |
|
return static_cast < CIMListenerRep * >(_rep)->removeConsumer(consumer); |
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |