Logo Search packages:      
Sourcecode: poco version File versions  Download package

template<class TArgs, class TStrategy, class TDelegate>
void Poco::AbstractEvent< TArgs, TStrategy, TDelegate >::notify ( const void *  pSender,
TArgs &  args 
) [inline, inherited]

Sends a notification to all registered delegates. The order is determined by the TStrategy. This method is blocking. While executing, other objects can change the list of delegates. These changes don't influence the current active notifications but are activated with the next notify. If one of the delegates throws an exception, the notify method is immediately aborted and the exception is reported to the caller.

Definition at line 204 of file AbstractEvent.h.

Referenced by Poco::Net::SSLManager::privateKeyPasswdCallback().

            SharedPtr<TStrategy> ptrStrat;
            bool enabled = false;
                  FastMutex::ScopedLock lock(_mutex);
                  enabled = _enabled;
                  if (_enabled)
                        // thread-safeness: 
                        // copy should be faster and safer than blocking until
                        // execution ends
                        ptrStrat = new TStrategy(_strategy);

            if (enabled)
                  ptrStrat->notify(pSender, args);

Generated by  Doxygen 1.6.0   Back to index