Packagecom.adobe.cairngorm.business
Classpublic class ServiceLocator
ImplementsIServiceLocator

The ServiceLocator allows service to be located and security credentials to be managed. Although credentials are set against a service they apply to the channel i.e. the set of services belonging to the channel share the same credentials. You must always make sure you call logout at the end of the user's session.



Public Methods
 MethodDefined by
  
ServiceLocator
  
getHTTPService(name:String):HTTPService
Return the HTTPService for the given name.
ServiceLocator
  
[static] Return the ServiceLocator instance.
ServiceLocator
  
getRemoteObject(name:String):RemoteObject
Return the RemoteObject for the given name.
ServiceLocator
  
getWebService(name:String):WebService
Return the WebService for the given name.
ServiceLocator
  
logout():void
Logs the user out of all registered services.
ServiceLocator
  
setCredentials(username:String, password:String):void
Set the credentials for all registered services.
ServiceLocator
  
setRemoteCredentials(username:String, password:String):void
Set the remote credentials for all registered services.
ServiceLocator
Constructor detail
ServiceLocator()constructor
public function ServiceLocator()
Method detail
getHTTPService()method
public function getHTTPService(name:String):HTTPService

Return the HTTPService for the given name.

Parameters
name:String — the name of the HTTPService

Returns
HTTPService — the HTTPService.
getInstance()method 
public static function getInstance():ServiceLocator

Return the ServiceLocator instance.

Returns
ServiceLocator — the instance.
getRemoteObject()method 
public function getRemoteObject(name:String):RemoteObject

Return the RemoteObject for the given name.

Parameters
name:String — the name of the RemoteObject.

Returns
RemoteObject — the RemoteObject.
getWebService()method 
public function getWebService(name:String):WebService

Return the WebService for the given name.

Parameters
name:String — the name of the WebService.

Returns
WebService — the WebService.
logout()method 
public function logout():void

Logs the user out of all registered services.

setCredentials()method 
public function setCredentials(username:String, password:String):void

Set the credentials for all registered services.

Parameters
username:String — the username to set.
 
password:String — the password to set.
setRemoteCredentials()method 
public function setRemoteCredentials(username:String, password:String):void

Set the remote credentials for all registered services.

Parameters
username:String — the username to set.
 
password:String — the password to set.