Packageorg.servebox.foundry.service
Classpublic class ServiceLocator

ServiceLocator holds a reference to services of the application.



Protected Properties
 PropertyDefined by
  logger : ILogger
[static] The class logger.
ServiceLocator
Public Methods
 MethodDefined by
  
Creates a new SimpleNotification object.
ServiceLocator
  
[static]
ServiceLocator
  
getService(id:String):AbstractService
Retrieves the reference to a service.
ServiceLocator
  
registerService(id:String, service:AbstractService):void
Registers a reference to the service with an id.
ServiceLocator
Property detail
loggerproperty
protected static var logger:ILogger

The class logger.

Constructor detail
ServiceLocator()constructor
public function ServiceLocator()

Creates a new SimpleNotification object.

Method detail
getInstance()method
public static function getInstance():ServiceLocator

Returns
ServiceLocator
getService()method 
public function getService(id:String):AbstractService

Retrieves the reference to a service.

Parameters
id:String — give id of the required service

Returns
AbstractService
registerService()method 
public function registerService(id:String, service:AbstractService):void

Registers a reference to the service with an id.

Parameters
id:String — give an id to the service
 
service:AbstractService — instance of the service