class ServiceFactory

File Information

Library: OSP
Package: Service
Header: Poco/OSP/ServiceFactory.h


A ServiceFactory is a special Service that, as its name implies, acts as a factory for Service objects.

If a subclass of ServiceFactory is registered as a service, the factory will be used to create a new instance of the service whenever the service is requested from the ServiceRegistry.


Direct Base Classes: Service

All Base Classes: Service, Poco::RefCountedObject

Member Summary

Member Functions: createService, isA, type

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


ServiceFactory protected


Creates the ServiceFactory.


~ServiceFactory protected virtual


Destroys the ServiceFactory.

Member Functions

createService virtual

virtual Service::Ptr createService() = 0;

Creates and returns a new instance of a Service.

isA virtual

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

type virtual

const std::type_info & type() const;