Namespace: Consultingwerk.OERA
Class 
ServiceManager Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:ServiceManager
Purpose:Manages running Service (Business Services) instances
Typically Business Entities and Business Tasks
Description:Provides a facade to the current IServiceManager implementation,
by default: Consultingwerk.OERA.ServiceManagerImpl
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Thu Sep 30 22:07:02 CET 2010
Notes:It is possible to use multiple instances of the same
Business Service class at once. In this case the business
service name should be concatenated from the class name
followed by CHR(1) and the instance identified



Top Method Summary
Options Name Purpose
+ DeregisterBusinessService (character) Deregisters an external Business Service from the ServiceManager class
+ Consultingwerk.OERA.IBusinessService GetBusinessService (character) Returns a reference to a Business Service Instance
# Consultingwerk.OERA.IServiceManager GetServiceManagerImpl () Returns the reference to the IServiceManager implementation
+ LOGICAL IsRunning (character) Returns if the given Business Service is already running
+ LOGICAL IsRunning (character, BusinessServiceTypeEnum) Returns if the given Business Service is already running
+ ProcessServiceLifeCycle () Processes the Service Life Cycle
+ RegisterBusinessService (character, IBusinessService) Registers an external Business Service with the ServiceManager class
+ StopAllBusinessServices () Stops all Business Services Instances
+ StopAllBusinessServices (Class) Stops all Business Services Instances of the given Class
+ StopBusinessService (character) Stops an Business Service Instance
+ StopBusinessService (character, NotRunningServiceEnum) Stops an Business Service Instance


Method Detail
Top

PUBLIC DeregisterBusinessService (character)

Purpose: Deregisters an external Business Service from the ServiceManager class
Notes: External Business Services are launched externally, may even be
regsitered in the ServiceContainer class. This is useful for allowing
access to Session Services (e.g. FrameworkSettings:ServiceContainer) to
be exposed to clients using the Service Interface while staying directly
accessible on the back end though the ServiceContainer. External Business
Services are considered not to be managed by the ServiceManager, that
is the ServiceManager will not attempt to shut them down in the Stop...
kind of methods.

Parameters:
pcServiceName CHARACTER
The name of the Service to be deregistered (typically the class name)
Top

PUBLIC Consultingwerk.OERA.IBusinessService GetBusinessService (character)

Purpose: Returns a reference to a Business Service Instance
Notes: Starts the Business Service if required (using LaunchBusinessService)

Parameters:
pcServiceName CHARACTER
The Name of the Business Service, evtl. containing a # or |, see Notes at LaunchBusinessService
Returns Consultingwerk.OERA.IBusinessService
The reference to the IBusinessService
Top

PROTECTED Consultingwerk.OERA.IServiceManager GetServiceManagerImpl ()

Purpose: Returns the reference to the IServiceManager implementation
Notes: May create the instance of the ServiceManagerImpl on first request

Returns Consultingwerk.OERA.IServiceManager
The IServiceManagerImpl instance
Top

PUBLIC LOGICAL IsRunning (character)

Purpose: Returns if the given Business Service is already running
Notes: Default version of the method only checks for externally launched
(=registered) Business Services

Parameters:
pcServiceName CHARACTER
The name under which the service is registered (typically the class name)
Returns LOGICAL
Logical value indicating if the Business Service is running
Top

PUBLIC LOGICAL IsRunning (character, BusinessServiceTypeEnum)

Purpose: Returns if the given Business Service is already running
Notes:

Parameters:
pcServiceName CHARACTER
The name under which the service is registered (typically the class name)
poServiceType Consultingwerk.OERA.BusinessServiceTypeEnum
The service type to check for
Returns LOGICAL
Logical value indicating if the Business Service is running
Top

PUBLIC ProcessServiceLifeCycle ()

Purpose: Processes the Service Life Cycle
Notes: Shuts down Business Services based on the definition of the life cycle

Top

PUBLIC RegisterBusinessService (character, IBusinessService)

Purpose: Registers an external Business Service with the ServiceManager class
Notes: External Business Services are launched externally, may even be
regsitered in the ServiceContainer class. This is useful for allowing
access to Session Services (e.g. FrameworkSettings:ServiceContainer) to
be exposed to clients using the Service Interface while staying directly
accessible on the back end though the ServiceContainer. External Business
Services are considered not to be managed by the ServiceManager, that
is the ServiceManager will not attempt to shut them down in the Stop...
kind of methods.

Parameters:
pcServiceName CHARACTER
The name under which the service will be registered (typically the class name)
poInstance Consultingwerk.OERA.IBusinessService
The instance of the business service
Top

PUBLIC StopAllBusinessServices ()

Purpose: Stops all Business Services Instances
Notes:

Top

PUBLIC StopAllBusinessServices (Class)

Purpose: Stops all Business Services Instances of the given Class
Notes:

Parameters:
poClass Progress.Lang.Class
The Progress.Lang.Class reference (Class or Interface)
Top

PUBLIC StopBusinessService (character)

Purpose: Stops an Business Service Instance
Notes: Defaults to StopBusinessService (pcServiceName, NotRunningServiceEnum:Throw)

Parameters:
pcServiceName CHARACTER
The Name of the Business Service, evtl. containing a # or |, see Notes at LaunchBusinessService
Top

PUBLIC StopBusinessService (character, NotRunningServiceEnum)

Purpose: Stops an Business Service Instance
Notes:

Parameters:
pcServiceName CHARACTER
The Name of the Business Service, evtl. containing a # or |, see Notes at LaunchBusinessService
poNotRunningServiceEnum Consultingwerk.OERA.NotRunningServiceEnum
The NotRunningServiceEnum value indicating how to handle a Business Service that is not running


©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:30:29