Poco::OSP::Web

class WebServerExtensionPoint

Library: OSPWeb
Package: Web
Header: Poco/OSP/Web/WebServerExtensionPoint.h

Description

WebServerExtension handles two extensions points. To register a directory in the Webserver:

<extension point="osp.web.server.directory" 
           path="URI" 
           resource="dir inside bundle" 
           allowSpecialization="none|owner|all"
           index="index.html"/>

To register a RequestHandlerFactory for a given server uri/set of uris:

<extension point="osp.web.server.requesthandler" 
           path="URI"
           class="MyRequestHandlerFactory" 
           library="MyLib"/>

Note that the extension points are automatically removed if a bundle is stopped.

The following attributes can be specified for both extension points:

The following attributes can be specified for "osp.web.server.directory":

The following attributes can be specified for "osp.web.server.requesthandler":

Inheritance

Direct Base Classes: Poco::OSP::ExtensionPoint

All Base Classes: Poco::OSP::ExtensionPoint, Poco::RefCountedObject

Member Summary

Member Functions: handleCommon, handleDirectory, handleExtension, handleRequestHandler, onBundleStopped

Inherited Functions: duplicate, handleExtension, referenceCount, release

Constructors

WebServerExtensionPoint

WebServerExtensionPoint(
    BundleContext::Ptr pContext,
    WebServerDispatcher * pDispatcher
);

Creates the WebServerExtension. Expects a not null pointer to the Web which must be valid during the whole life-time of the extension object

Destructor

~WebServerExtensionPoint virtual

~WebServerExtensionPoint();

Destroys the WebServerExtension.

Member Functions

handleExtension virtual

void handleExtension(
    Bundle::ConstPtr pBundle,
    Poco::XML::Element * pExtensionElem
);

See also: Poco::OSP::ExtensionPoint::handleExtension()

handleCommon protected

void handleCommon(
    Bundle::ConstPtr pBundle,
    Poco::XML::Element * pExtensionElem,
    WebServerDispatcher::VirtualPath & vPath
);

handleDirectory protected

void handleDirectory(
    Bundle::ConstPtr pBundle,
    Poco::XML::Element * pExtensionElem
);

handleRequestHandler protected

void handleRequestHandler(
    Bundle::ConstPtr pBundle,
    Poco::XML::Element * pExtensionElem
);

onBundleStopped protected

void onBundleStopped(
    const void * pSender,
    BundleEvent & ev
);

When a bundle is stopped, all of its request handlers and mappings are automatically disabled.

Variables

EXTPOINT_DIRECTORY static

static const std::string EXTPOINT_DIRECTORY;

EXTPOINT_HANDLER static

static const std::string EXTPOINT_HANDLER;

ATTR_ALLOWSPECIALIZATION protected static

static const std::string ATTR_ALLOWSPECIALIZATION;

ATTR_CLASS protected static

static const std::string ATTR_CLASS;

ATTR_DESCRIPTION protected static

static const std::string ATTR_DESCRIPTION;

ATTR_HIDDEN protected static

static const std::string ATTR_HIDDEN;

ATTR_INDEX protected static

static const std::string ATTR_INDEX;

ATTR_LIBRARY protected static

static const std::string ATTR_LIBRARY;

ATTR_PATH protected static

static const std::string ATTR_PATH;

ATTR_PERMISSION protected static

static const std::string ATTR_PERMISSION;

ATTR_REALM protected static

static const std::string ATTR_REALM;

ATTR_RESOURCE protected static

static const std::string ATTR_RESOURCE;

ATTR_SECURE protected static

static const std::string ATTR_SECURE;

MANIFEST_NAME protected static

static const std::string MANIFEST_NAME;