OW_NAMESPACE::IndicationServerImplThread Class Reference

#include <OW_IndicationServerImpl.hpp>

Inheritance diagram for OW_NAMESPACE::IndicationServerImplThread:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::IndicationServerImplThread:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IndicationServerImplThread ()
 ~IndicationServerImplThread ()
virtual void init (const CIMOMEnvironmentRef &env)
virtual void waitUntilReady ()
virtual Int32 run ()
 The method that will be run when the start method is called.
void shutdown ()
void processIndication (const CIMInstance &instance, const String &instNS)
CIMOMEnvironmentRef getEnvironment () const
bool getNewTrans (NotifyTrans &outTrans)
virtual void startDeleteSubscription (const String &ns, const CIMObjectPath &subPath)
virtual void startCreateSubscription (const String &ns, const CIMInstance &subInst, const String &username)
virtual void startModifySubscription (const String &ns, const CIMInstance &subInst)
void deleteSubscription (const String &ns, const CIMObjectPath &subPath)
void createSubscription (const String &ns, const CIMInstance &subInst, const String &username)
void modifySubscription (const String &ns, const CIMInstance &subInst)
virtual void modifyFilter (const String &ns, const CIMInstance &filterInst, const String &userName)
virtual void doCooperativeCancel ()
 This function is available for subclasses of Thread to override if they wish to be notified when a cooperative cancel is being invoked on the instance.

Private Types

typedef IntrusiveReference<
Subscription
SubscriptionRef
typedef HashMultiMap< String,
SubscriptionRef
subscriptions_t
typedef std::vector< subscriptions_t
>::value_type 
subscriptions_copy_t
typedef subscriptions_copy_t::iterator subscriptions_iterator
typedef SortedVectorMap< CIMName,
IndicationExportProviderIFCRef
provider_map_t
typedef SharedLibraryReference<
IntrusiveReference< LifecycleIndicationPoller > > 
LifecycleIndicationPollerRef
typedef Map< CIMName, LifecycleIndicationPollerRefpoller_map_t

Private Member Functions

void _processIndication (const CIMInstance &instance, const String &instNS)
void _processIndicationRange (const CIMInstance &instanceArg, const String instNS, subscriptions_iterator first, subscriptions_iterator last)
void addTrans (const String &ns, const CIMInstance &indication, const CIMInstance &handler, const CIMInstance &subscription, IndicationExportProviderIFCRef provider)
IndicationExportProviderIFCRef getProvider (const CIMName &className)
void deactivateAllSubscriptions ()

Private Attributes

provider_map_t m_providers
List< ProcIndicationTransm_procTrans
bool m_shuttingDown
NonRecursiveMutex m_mainLoopGuard
Condition m_mainLoopCondition
CIMOMEnvironmentRef m_env
ThreadBarrier m_startedBarrier
subscriptions_t m_subscriptions
Mutex m_subGuard
poller_map_t m_pollers
ThreadPoolRef m_notifierThreadPool
ThreadPoolRef m_subscriptionPool
WQLIFCRef m_wqlRef
LoggerRef m_logger

Classes

struct  ProcIndicationTrans
struct  Subscription

Detailed Description

Definition at line 92 of file OW_IndicationServerImpl.hpp.


Member Typedef Documentation

typedef SharedLibraryReference< IntrusiveReference<LifecycleIndicationPoller> > OW_NAMESPACE::IndicationServerImplThread::LifecycleIndicationPollerRef [private]
 

Definition at line 190 of file OW_IndicationServerImpl.hpp.

typedef Map<CIMName, LifecycleIndicationPollerRef > OW_NAMESPACE::IndicationServerImplThread::poller_map_t [private]
 

Definition at line 191 of file OW_IndicationServerImpl.hpp.

typedef SortedVectorMap<CIMName, IndicationExportProviderIFCRef> OW_NAMESPACE::IndicationServerImplThread::provider_map_t [private]
 

Definition at line 177 of file OW_IndicationServerImpl.hpp.

typedef IntrusiveReference<Subscription> OW_NAMESPACE::IndicationServerImplThread::SubscriptionRef [private]
 

Definition at line 137 of file OW_IndicationServerImpl.hpp.

typedef std::vector<subscriptions_t>::value_type OW_NAMESPACE::IndicationServerImplThread::subscriptions_copy_t [private]
 

Definition at line 148 of file OW_IndicationServerImpl.hpp.

typedef subscriptions_copy_t::iterator OW_NAMESPACE::IndicationServerImplThread::subscriptions_iterator [private]
 

Definition at line 150 of file OW_IndicationServerImpl.hpp.

typedef HashMultiMap<String, SubscriptionRef> OW_NAMESPACE::IndicationServerImplThread::subscriptions_t [private]
 

Definition at line 142 of file OW_IndicationServerImpl.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::IndicationServerImplThread::IndicationServerImplThread  ) 
 

Definition at line 319 of file OW_IndicationServerImpl.cpp.

OW_NAMESPACE::IndicationServerImplThread::~IndicationServerImplThread  ) 
 

Definition at line 464 of file OW_IndicationServerImpl.cpp.

References OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::clear(), and m_providers.


Member Function Documentation

void OW_NAMESPACE::IndicationServerImplThread::_processIndication const CIMInstance instance,
const String instNS
[private]
 

Definition at line 712 of file OW_IndicationServerImpl.cpp.

References _processIndicationRange(), context, OW_NAMESPACE::CIMDataType::EMBEDDEDINSTANCE, OW_NAMESPACE::CIMValue::get(), OW_NAMESPACE::CIMInstance::getClassName(), OW_NAMESPACE::CIMInstance::getProperty(), OW_NAMESPACE::CIMValue::getType(), m_env, m_subGuard, m_subscriptions, OW_LOG_DEBUG, OW_LOG_ERROR, OW_NAMESPACE::MutexLock::release(), OW_NAMESPACE::String::toLowerCase(), OW_NAMESPACE::CIMName::toString(), and OW_NAMESPACE::CIMInstance::toString().

Referenced by run().

void OW_NAMESPACE::IndicationServerImplThread::_processIndicationRange const CIMInstance instanceArg,
const String  instNS,
subscriptions_iterator  first,
subscriptions_iterator  last
[private]
 

Definition at line 797 of file OW_IndicationServerImpl.cpp.

References context, OW_NAMESPACE::CIMOMEnvironment::E_DONT_SEND_INDICATIONS, hdl, m_env, OW_LOG_DEBUG, sub, and OW_NAMESPACE::CIMObjectPath::toString().

Referenced by _processIndication().

void OW_NAMESPACE::IndicationServerImplThread::addTrans const String ns,
const CIMInstance indication,
const CIMInstance handler,
const CIMInstance subscription,
IndicationExportProviderIFCRef  provider
[private]
 

Definition at line 867 of file OW_IndicationServerImpl.cpp.

References handler, m_notifierThreadPool, ns, OW_LOG_ERROR, and OW_NAMESPACE::CIMInstance::toMOF().

void OW_NAMESPACE::IndicationServerImplThread::createSubscription const String ns,
const CIMInstance subInst,
const String username
 

Definition at line 1104 of file OW_IndicationServerImpl.cpp.

References context, OW_NAMESPACE::String::empty(), OW_NAMESPACE::CIMObjectPath::getNameSpace(), OW_NAMESPACE::CIMInstance::getProperty(), OW_NAMESPACE::CIMProperty::getValueT(), hdl, m_env, ns, OW_LOG_DEBUG, subInst, OW_NAMESPACE::CIMValue::toCIMObjectPath(), and OW_NAMESPACE::CIMInstance::toString().

void OW_NAMESPACE::IndicationServerImplThread::deactivateAllSubscriptions  )  [private]
 

Definition at line 533 of file OW_IndicationServerImpl.cpp.

References m_subscriptions.

Referenced by shutdown().

void OW_NAMESPACE::IndicationServerImplThread::deleteSubscription const String ns,
const CIMObjectPath subPath
 

Definition at line 895 of file OW_IndicationServerImpl.cpp.

References cop, OW_NAMESPACE::CIMObjectPath::equals(), m_subGuard, m_subscriptions, ns, OW_LOG_DEBUG, OW_NAMESPACE::CIMObjectPath::setNameSpace(), and OW_NAMESPACE::CIMObjectPath::toString().

void OW_NAMESPACE::IndicationServerImplThread::doCooperativeCancel  )  [virtual]
 

This function is available for subclasses of Thread to override if they wish to be notified when a cooperative cancel is being invoked on the instance.

Note that this function will be invoked in a separate thread. For instance, a thread may use this function to write to a pipe or socket, if Thread::run() is blocked in select(), it can be unblocked and instructed to exit.

It is also possible for an individual thread to override the cancellation request, if it knows that cancellation at this time may crash the system or cause a deadlock. To do this, the thread should throw an CancellationDeniedException. Note that threads are usually only cancelled in the event of a system shutdown or restart, so a thread should make a best effort to actually shutdown.

Exceptions:
CancellationDeniedException 

Reimplemented from OW_NAMESPACE::Thread.

Definition at line 1472 of file OW_IndicationServerImpl.cpp.

References m_mainLoopCondition, m_mainLoopGuard, m_shuttingDown, and OW_NAMESPACE::Condition::notifyAll().

CIMOMEnvironmentRef OW_NAMESPACE::IndicationServerImplThread::getEnvironment  )  const
 

Definition at line 452 of file OW_IndicationServerImpl.cpp.

References m_env.

bool OW_NAMESPACE::IndicationServerImplThread::getNewTrans NotifyTrans outTrans  ) 
 

IndicationExportProviderIFCRef OW_NAMESPACE::IndicationServerImplThread::getProvider const CIMName className  )  [private]
 

Definition at line 882 of file OW_IndicationServerImpl.cpp.

References className, OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::end(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::find(), and m_providers.

void OW_NAMESPACE::IndicationServerImplThread::init const CIMOMEnvironmentRef env  )  [virtual]
 

Definition at line 395 of file OW_IndicationServerImpl.cpp.

References OW_NAMESPACE::COMPONENT_NAME, OW_NAMESPACE::createProvEnvRef(), OW_NAMESPACE::ThreadPool::DYNAMIC_SIZE, env, i, m_env, m_logger, m_notifierThreadPool, m_providers, m_subscriptionPool, OW_NAMESPACE::ConfigOpts::MAX_INDICATION_EXPORT_THREADS_opt, OW_DEFAULT_MAX_INDICATION_EXPORT_THREADS, OW_LOG_DEBUG, and OW_NAMESPACE::Array< T >::size().

void OW_NAMESPACE::IndicationServerImplThread::modifyFilter const String ns,
const CIMInstance filterInst,
const String userName
[virtual]
 

Definition at line 1434 of file OW_IndicationServerImpl.cpp.

References context, hdl, m_env, ns, startCreateSubscription(), and startDeleteSubscription().

void OW_NAMESPACE::IndicationServerImplThread::modifySubscription const String ns,
const CIMInstance subInst
 

Definition at line 1412 of file OW_IndicationServerImpl.cpp.

References cop, OW_NAMESPACE::CIMObjectPath::equals(), m_subGuard, m_subscriptions, ns, sub, and subInst.

void OW_NAMESPACE::IndicationServerImplThread::processIndication const CIMInstance instance,
const String instNS
 

Definition at line 593 of file OW_IndicationServerImpl.cpp.

References m_mainLoopCondition, m_mainLoopGuard, m_procTrans, m_shuttingDown, OW_NAMESPACE::Condition::notifyOne(), and OW_NAMESPACE::List< T >::push_back().

Int32 OW_NAMESPACE::IndicationServerImplThread::run  )  [virtual]
 

The method that will be run when the start method is called.

Implements OW_NAMESPACE::Thread.

Definition at line 477 of file OW_IndicationServerImpl.cpp.

References _processIndication(), context, OW_NAMESPACE::List< T >::empty(), OW_NAMESPACE::List< T >::front(), m_env, m_logger, m_mainLoopCondition, m_mainLoopGuard, m_procTrans, m_shuttingDown, m_startedBarrier, OW_LOG_ERROR, OW_NAMESPACE::List< T >::pop_front(), OW_NAMESPACE::Condition::wait(), and OW_NAMESPACE::ThreadBarrier::wait().

void OW_NAMESPACE::IndicationServerImplThread::shutdown  ) 
 

Definition at line 569 of file OW_IndicationServerImpl.cpp.

References OW_NAMESPACE::Map< Key, T, Compare >::clear(), OW_NAMESPACE::List< T >::clear(), OW_NAMESPACE::SortedVectorMap< Key, T, Compare >::clear(), deactivateAllSubscriptions(), OW_NAMESPACE::Thread::join(), m_env, m_mainLoopCondition, m_mainLoopGuard, m_notifierThreadPool, m_pollers, m_procTrans, m_providers, m_shuttingDown, m_subscriptionPool, m_subscriptions, m_wqlRef, OW_NAMESPACE::Condition::notifyAll(), and OW_NAMESPACE::SharedLibraryReference< T >::setNull().

void OW_NAMESPACE::IndicationServerImplThread::startCreateSubscription const String ns,
const CIMInstance subInst,
const String username
[virtual]
 

Definition at line 1080 of file OW_IndicationServerImpl.cpp.

References m_subscriptionPool, ns, subInst, and username.

Referenced by modifyFilter().

void OW_NAMESPACE::IndicationServerImplThread::startDeleteSubscription const String ns,
const CIMObjectPath subPath
[virtual]
 

Definition at line 1096 of file OW_IndicationServerImpl.cpp.

References m_subscriptionPool, ns, and sub.

Referenced by modifyFilter().

void OW_NAMESPACE::IndicationServerImplThread::startModifySubscription const String ns,
const CIMInstance subInst
[virtual]
 

Definition at line 1088 of file OW_IndicationServerImpl.cpp.

References m_subscriptionPool, ns, and subInst.

void OW_NAMESPACE::IndicationServerImplThread::waitUntilReady  )  [virtual]
 

Definition at line 459 of file OW_IndicationServerImpl.cpp.

References m_startedBarrier, and OW_NAMESPACE::ThreadBarrier::wait().


Member Data Documentation

CIMOMEnvironmentRef OW_NAMESPACE::IndicationServerImplThread::m_env [private]
 

Definition at line 186 of file OW_IndicationServerImpl.hpp.

Referenced by _processIndication(), _processIndicationRange(), createSubscription(), getEnvironment(), init(), modifyFilter(), run(), and shutdown().

LoggerRef OW_NAMESPACE::IndicationServerImplThread::m_logger [private]
 

Definition at line 196 of file OW_IndicationServerImpl.hpp.

Referenced by init(), and run().

Condition OW_NAMESPACE::IndicationServerImplThread::m_mainLoopCondition [private]
 

Definition at line 185 of file OW_IndicationServerImpl.hpp.

Referenced by doCooperativeCancel(), processIndication(), run(), and shutdown().

NonRecursiveMutex OW_NAMESPACE::IndicationServerImplThread::m_mainLoopGuard [private]
 

Definition at line 184 of file OW_IndicationServerImpl.hpp.

Referenced by doCooperativeCancel(), processIndication(), run(), and shutdown().

ThreadPoolRef OW_NAMESPACE::IndicationServerImplThread::m_notifierThreadPool [private]
 

Definition at line 193 of file OW_IndicationServerImpl.hpp.

Referenced by addTrans(), init(), and shutdown().

poller_map_t OW_NAMESPACE::IndicationServerImplThread::m_pollers [private]
 

Definition at line 192 of file OW_IndicationServerImpl.hpp.

Referenced by shutdown().

List<ProcIndicationTrans> OW_NAMESPACE::IndicationServerImplThread::m_procTrans [private]
 

Definition at line 182 of file OW_IndicationServerImpl.hpp.

Referenced by processIndication(), run(), and shutdown().

provider_map_t OW_NAMESPACE::IndicationServerImplThread::m_providers [private]
 

Definition at line 178 of file OW_IndicationServerImpl.hpp.

Referenced by getProvider(), init(), shutdown(), and ~IndicationServerImplThread().

bool OW_NAMESPACE::IndicationServerImplThread::m_shuttingDown [private]
 

Definition at line 183 of file OW_IndicationServerImpl.hpp.

Referenced by doCooperativeCancel(), processIndication(), run(), and shutdown().

ThreadBarrier OW_NAMESPACE::IndicationServerImplThread::m_startedBarrier [private]
 

Definition at line 187 of file OW_IndicationServerImpl.hpp.

Referenced by run(), and waitUntilReady().

Mutex OW_NAMESPACE::IndicationServerImplThread::m_subGuard [private]
 

Definition at line 189 of file OW_IndicationServerImpl.hpp.

Referenced by _processIndication(), deleteSubscription(), and modifySubscription().

ThreadPoolRef OW_NAMESPACE::IndicationServerImplThread::m_subscriptionPool [private]
 

Definition at line 194 of file OW_IndicationServerImpl.hpp.

Referenced by init(), shutdown(), startCreateSubscription(), startDeleteSubscription(), and startModifySubscription().

subscriptions_t OW_NAMESPACE::IndicationServerImplThread::m_subscriptions [private]
 

Definition at line 188 of file OW_IndicationServerImpl.hpp.

Referenced by _processIndication(), deactivateAllSubscriptions(), deleteSubscription(), modifySubscription(), and shutdown().

WQLIFCRef OW_NAMESPACE::IndicationServerImplThread::m_wqlRef [private]
 

Definition at line 195 of file OW_IndicationServerImpl.hpp.

Referenced by shutdown().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:13:05 2006 for openwbem by  doxygen 1.4.6