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.
Static variables
Static methods
staticreleaseInstance():Void
Releases the current instance so that the next call to getInstance()
returns a new instance.
Variables
Methods
getHTTPService(name:String):HTTPService
Return the HTTPService for the given name.
Parameters:
name | the name of the HTTPService |
---|
Returns:
the HTTPService.
getInvokerService(serviceId:String):AbstractInvoker
Deprecated.
Returns an AbstractInvoker defined for the id, to allow services to be looked up using the ServiceLocator by a canonical name.
If no service exists for the service name, an Error will be thrown.
Parameters:
serviceId | The id of the service to be returned. This is the id defined in the concrete service locator implementation. |
---|
getRemoteObject(name:String):RemoteObject
Return the RemoteObject for the given name.
Parameters:
name | the name of the RemoteObject. |
---|
Returns:
the RemoteObject.
getService(serviceId:String):AbstractService
Deprecated.
Returns the service defined for the id, to allow services to be looked up using the ServiceLocator by a canonical name.
If no service exists for the service name, an Error will be thrown.
Parameters:
serviceId | The id of the service to be returned. This is the id defined in the concrete service locator implementation. |
---|
setCredentials(username:String, password:String):Void
Set the credentials for all registered services.
Parameters:
username | the username to set. |
---|---|
password | the password to set. |
setRemoteCredentials(username:String, password:String):Void
Set the remote credentials for all registered services.
Parameters:
username | the username to set. |
---|---|
password | the password to set. |