Poco::OSP

class OSPSubsystem

Library: OSP
Package: Util
Header: Poco/OSP/OSPSubsystem.h

Description

This subsystem implementation sets up the OSP runtime environment, including BundleLoader, CodeCache and ServiceRegistry.

It also defines the "clean" command line option, which forces the code cache to be cleared, and the "bundles" command line option which allows for specification of additional bundle repositories.

The following configuration properties are used:

  • osp.bundleRepository: list of directories containing bundles (defaults to ${application.dir}bundles)
  • osp.codeCache: location of code cache directory (defaults to ${application.dir}codeCache)
  • osp.autoUpdateCodeCache: automatically update shared libraries in codeCache with newer versions found in bundles
  • osp.sharedCodeCache: allow using the same code cache directory for multiple processes, causing certain operations to be guarded by a global lock
  • osp.language: language used for localization (overrides the system default)
  • osp.data the directory where temporary and persistent data for bundles is stored (defaults to ${application.dir}data)

The following configuration properties are set:

  • osp.version: OSP Version from osp.core bundle (only if osp.core bundle is present)
  • osp.osname: name of operating system
  • osp.osarch: hardware architecture identifier

Inheritance

Direct Base Classes: Poco::Util::Subsystem

All Base Classes: Poco::RefCountedObject, Poco::Util::Subsystem

Member Summary

Member Functions: bundleLoader, cancelInit, defineOptions, getBundleFilter, handleBundles, handleClear, initialize, loadBundles, name, serviceRegistry, setBundleFilter, startBundles, uninitialize

Inherited Functions: defineOptions, duplicate, initialize, name, referenceCount, reinitialize, release, uninitialize

Constructors

OSPSubsystem

OSPSubsystem();

Creates the OSPSubsystem.

Destructor

~OSPSubsystem virtual

~OSPSubsystem();

Destroys the OSPSubsystem.

Member Functions

bundleLoader inline

BundleLoader & bundleLoader();

Returns a reference to the bundle loader.

cancelInit

void cancelInit();

Cancels initialization.

defineOptions

void defineOptions(
    Poco::Util::OptionSet & options
);

getBundleFilter

BundleFilter::Ptr getBundleFilter() const;

Returns the BundleFilter used by the BundleRepository. May return a null pointer if no BundleFilter has been set.

initialize

void initialize(
    Poco::Util::Application & app
);

name virtual

const char * name() const;

serviceRegistry inline

ServiceRegistry & serviceRegistry();

Returns a reference to the service registry.

setBundleFilter

void setBundleFilter(
    BundleFilter::Ptr pFilter
);

Sets the BundleFilter to be used by the BundleRepository. May be set to a null pointer to disable filtering.

Must be called before initialize().

uninitialize virtual

void uninitialize();

handleBundles protected

void handleBundles(
    const std::string & name,
    const std::string & value
);

handleClear protected

void handleClear(
    const std::string & name,
    const std::string & value
);

loadBundles protected virtual

virtual void loadBundles(
    Poco::Util::Application & app
);

Loads all bundles from all known bundle repositories.

startBundles protected virtual

virtual void startBundles(
    Poco::Util::Application & app
);

Resolves and starts all loaded bundles.

Securely control IoT edge devices from anywhere   Connect a Device