Library: OSP
Package: ExtensionPointService
Header: Poco/OSP/ExtensionPoint.h
An extension point allows a bundle to provide "hooks" that other bundles can hook into to extend a bundle's functionality.
A bundle registers one or more instances of subclasses of ExtensionPoint with the ExtensionPointService. The ExtensionPointService then looks for an "extensions.xml" file in every bundle that is started and calls the handleExtension() member function for every extension element targetted at the extension point.
Direct Base Classes: Poco::RefCountedObject
All Base Classes: Poco::RefCountedObject
Known Derived Classes: Poco::OSP::Web::WebServerExtensionPoint
Member Functions: handleExtension
Inherited Functions: duplicate, referenceCount, release
typedef Poco::AutoPtr < ExtensionPoint > Ptr;
Creates the ExtensionPoint.
~ExtensionPoint();
Destroys the ExtensionPoint.
virtual void handleExtension(
Bundle::ConstPtr pBundle,
Poco::XML::Element * pExtensionElem
) = 0;
Handles the "extension" element in a bundle's "extensions.xml" configuration file. Must be overridden by subclasses.
The ExtensionPoint facility entirely leaves it to the ExtensionPoint subclass to define the content (child elements and attributes) of the extension element. The only required attribute on the "extension" element is the "point" attribute identifying the extension point (and thus the ExtensionPoint object handling the "extension" element.