Packageorg.springextensions.actionscript.cairngorm.business
SVN browsingCairngormServiceLocator.as
FisheyeCairngormServiceLocator.as
Classpublic dynamic class CairngormServiceLocator
InheritanceCairngormServiceLocator Inheritance com.adobe.cairngorm.business.ServiceLocator

Allows programmatic manipulation of the services inside Cairngorm's ServiceLocator. This enabled the IoC Container to configure the ServiceLocator at runtime.

Here's an example of a service locator xml definition:

 <object id="serviceLocator" class="org.springextensions.actionscript.ioc.util.CairngormServiceLocator" factory-method="getInstance">
    <property name="productService">
      <ref>productService</ref>
    </property>
  </object>

The productService is defined as:

 <object id="productService" class="com.renaun.rpc.RemoteObjectAMF0">
    <property name="id" value="productService"/>
    <property name="endpoint" value="http://localhost/amfphp/gateway.php"/>
    <property name="source" value="com.adobe.cairngorm.samples.store.business.ProductDelegate"/>
    <property name="showBusyCursor" value="true"/>
    <property name="makeObjectsBindable" value="true"/>
  </object>
  



Documentation reference: the servicelocator


Public Methods
 MethodDefined by
  
Creates a new CairngormServiceLocator object.
CairngormServiceLocator
  
getHTTPService(name:String):HTTPService
Returns the HTTPService with the specified name or null if it wasn't found.
CairngormServiceLocator
  
[static] Returns the singleton instance of the CairngormServiceLocator.
CairngormServiceLocator
  
getRemoteObject(name:String):RemoteObject
Returns the RemoteObject with the specified name or null if it wasn't found.
CairngormServiceLocator
  
getWebService(name:String):WebService
Returns the WebService with the specified name or null if it wasn't found.
CairngormServiceLocator
Constructor detail
CairngormServiceLocator()constructor
public function CairngormServiceLocator()

Creates a new CairngormServiceLocator object. Note: this constructor should never be called. To obtain an instance of this class, call the static getInstance method.

Method detail
getHTTPService()method
public override function getHTTPService(name:String):HTTPService

Returns the HTTPService with the specified name or null if it wasn't found.

Parameters
name:String

Returns
HTTPService
getInstance()method 
public static function getInstance():CairngormServiceLocator

Returns the singleton instance of the CairngormServiceLocator.

Returns
CairngormServiceLocator
getRemoteObject()method 
public override function getRemoteObject(name:String):RemoteObject

Returns the RemoteObject with the specified name or null if it wasn't found.

Parameters
name:String

Returns
RemoteObject
getWebService()method 
public override function getWebService(name:String):WebService

Returns the WebService with the specified name or null if it wasn't found.

Parameters
name:String

Returns
WebService