Poco::OSP

class BundleInstallerService

File Information

Library: OSP
Package: BundleInstallerService
Header: Poco/OSP/BundleInstallerService.h

Description

The BundleInstallerService allows a bundle to install other bundles, either from a stream or from a URI.

The service name of the BundleInstallerService is "osp.core.installer".

Inheritance

Direct Base Classes: Service

All Base Classes: Service, Poco::RefCountedObject

Member Summary

Member Functions: installBundle, isA, replaceBundle, type

Inherited Functions: duplicate, isA, referenceCount, release, type

Types Aliases

ConstPtr

using ConstPtr = const Ptr;

Ptr

using Ptr = Poco::AutoPtr < BundleInstallerService >;

Constructors

BundleInstallerService

BundleInstallerService(
    BundleRepository & repository
);

Creates the BundleInstallerService, using the given BundleRepository.

Destructor

~BundleInstallerService protected virtual

~BundleInstallerService();

Destroys the BundleInstallerService.

Member Functions

installBundle

Bundle::Ptr installBundle(
    const std::string & uri
);

Installs a bundle from the given URI. The Poco::URIStreamOpener class is used to open a stream for the given URI.

Returns a pointer to the installed bundle.

installBundle

Bundle::Ptr installBundle(
    std::istream & istr
);

Installs a bundle from the given stream.

Returns a pointer to the installed bundle.

isA virtual

bool isA(
    const std::type_info & otherType
) const;

replaceBundle

Bundle::Ptr replaceBundle(
    const std::string & symbolicName,
    std::istream & istr
);

Upgrades or replaces a bundle from the given stream.

Returns a pointer to the installed bundle.

replaceBundle

Bundle::Ptr replaceBundle(
    const std::string & symbolicName,
    const std::string & uri
);

Upgrades or replaces a bundle from the given URI. The Poco::URIStreamOpener class is used to open a stream for the given URI.

Returns a pointer to the installed bundle.

type virtual

const std::type_info & type() const;

Variables

SERVICE_NAME static

static const std::string SERVICE_NAME;