Namespace: Consultingwerk.Framework
Interface 
IServiceContainer Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implemented by: Consultingwerk.Framework.ServiceContainer

File:IServiceContainer
Purpose:Provides a container for services.
Description:General purpose interface to manage services by type / class
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Thu Dec 23 13:01:38 CET 2010
Notes:see System.ComponentModel.Design.IServiceContainer
http://msdn.microsoft.com/en-us/library/system.componentmodel.design.iservicecontainer.aspx
Purpose: Adds the specified service to the service container.
Notes:



Top Method Summary
Options Name Purpose
+ Progress.Lang.Object AddNewService (Class, Object) Adds the specified service to the service container.
+ Progress.Lang.Object AddService (Class, Object) Adds the specified service to the service container.
+ DisposeServices () Disposes all services
+ Progress.Lang.Object GetMandatoryService (Class) Gets the service object of the specified type.
+ Progress.Lang.Object GetService (Class) Gets the service object of the specified type.
+ LOGICAL IsRegistered (Object) Returns if the given object instance is registered as a Service in the service container of the overloading service container
+ Progress.Lang.Object ReloadService (Class) Reloads the Service instance
+ RemoveService (Class) Removes the specified service type from the service container.


Method Detail
Top

PUBLIC Progress.Lang.Object AddNewService (Class, Object)

Purpose: Adds the specified service to the service container.
Notes: If the Service implements the CCS IService Interface, we'll call the
initialize() method. This method is intended to be used by the
get-service.i include file with CCS style services that require to the
initialize()'d

Parameters:
poClass Progress.Lang.Class
The reference to the class or interface of the service to add
poObject Progress.Lang.Object
An instance of the service type to add. This object must implement or inherit from the type indicated by the serviceType parameter
Returns Progress.Lang.Object
The reference to the service that was added (poObject). This allows fluid style usage of this routine
Top

PUBLIC Progress.Lang.Object AddService (Class, Object)

Purpose: Adds the specified service to the service container.
Notes:

Parameters:
poClass Progress.Lang.Class
The reference to the class or interface of the service to add
poObject Progress.Lang.Object
An instance of the service type to add. This object must implement or inherit from the type indicated by the serviceType parameter
Returns Progress.Lang.Object
The reference to the service that was added (poObject). This allows fluid style usage of this routine
Top

PUBLIC DisposeServices ()

Purpose: Disposes all services
Notes: Calls dispose() on CCS IService implementations

Top

PUBLIC Progress.Lang.Object GetMandatoryService (Class)

Purpose: Gets the service object of the specified type.
Notes: Throws an ServiceNotRegisteredException when no service of that type
registered

Parameters:
poClass Progress.Lang.Class
The reference to the class or interface of the service to return
Returns Progress.Lang.Object
The reference to the instance of the service of ? when the service is not registered with the service container
Top

PUBLIC Progress.Lang.Object GetService (Class)

Purpose: Gets the service object of the specified type.
Notes: Returns ? when no service of that type is registered

Parameters:
poClass Progress.Lang.Class
The reference to the class or interface of the service to return
Returns Progress.Lang.Object
The reference to the instance of the service of ? when the service is not registered with the service container
Top

PUBLIC LOGICAL IsRegistered (Object)

Purpose: Returns if the given object instance is registered as a Service
in the service container of the overloading service container
Notes:

Parameters:
poService Progress.Lang.Object
The Service instance to check
Returns LOGICAL
Logical value indicating if the object instance is registered as a service
Top

PUBLIC Progress.Lang.Object ReloadService (Class)

Purpose: Reloads the Service instance
Notes: Does not actively delete the existing service instance, it will
just be deregistered
- creates a new instance of the currently loaded service using the default constructor
- removes the existing service from the service container
- adds the new service to the service container and calls initialize() when it's a CCS IService

Parameters:
poClass Progress.Lang.Class
as Progress.Lang.Class
Returns Progress.Lang.Object
The reference to the new Service Instance
Top

PUBLIC RemoveService (Class)

Purpose: Removes the specified service type from the service container.
Notes:

Parameters:
poClass Progress.Lang.Class
The reference to the class or interface of the service to remove from the service container.


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 12:59:05