ServiceProxyLocator

Kind of class:public class
Package:com.bourre.remoting
Inherits from:none
Implements:
Author:romain
Classpath:com.bourre.remoting.ServiceProxyLocator
File last modified:Monday, 24 November 2008, 11:36:48

Summary


Instance properties
Instance methods
  • setCredentials (sUserID:String, sPassword:String) : void
  • registerService (sServiceName:String, service:AbstractServiceProxy) : void
  • isRegistered (key:String) : Boolean
    • Returns {VISDOC_CODE_BLOCK_3} is there is a ressource associated
  • locate (key:String) : Object
    • Returns the ressource associated with the passed-in {VISDOC_CODE_BLOCK_9}.
  • add (d:Dictionary) : void
    • Adds all ressources contained in the passed-in dictionnary
  • hasGateway : Boolean
  • getKeys : Array
    • Returns an Array view of the keys contained in this locator.
  • getValues : Array
    • Returns an Array view of the values contained in this locator.

Constructor

ServiceProxyLocator

public function ServiceProxyLocator (
)

Instance properties

gatewayURL

public gatewayURL:URLRequest
(read,write)

Instance methods

add

public function add (
d:Dictionary) : void

Adds all ressources contained in the passed-in dictionnary
into this locator instance. If there is keys used both in
the locator and in the dictionnary an exception is thrown.
#
Parameters:
d:
dictionnary instance which contains ressources
to be added
#
Throws:
  • {VISDOC_LINK_0}{VISDOC_CODE_BLOCK_12} — One or more
    keys present in the dictionnary already exist in this
    locator instance.
    #
Specified by:

getKeys

public function getKeys (
) : Array

Returns an Array view of the keys contained in this locator.
Returns:
  • an array view of the keys contained in this locator
Specified by:

getValues

public function getValues (
) : Array

Returns an Array view of the values contained in this locator.
Returns:
  • an array view of the values contained in this locator
Specified by:

hasGateway

public function hasGateway (
) : Boolean

isRegistered

public function isRegistered (
key:String) : Boolean

Returns {VISDOC_CODE_BLOCK_3} is there is a ressource associated
with the passed-in {VISDOC_CODE_BLOCK_4}. To avoid errors when
retreiving ressources from a locator you should systematically
use the {VISDOC_CODE_BLOCK_5} function to check if the
ressource you would access is already accessible before any
call to the {VISDOC_CODE_BLOCK_6} function.
#
Returns:
  • {VISDOC_CODE_BLOCK_7} is there is a ressource associated
    with the passed-in {VISDOC_CODE_BLOCK_8}.
    #
Specified by:

locate

public function locate (
key:String) : Object

Returns the ressource associated with the passed-in {VISDOC_CODE_BLOCK_9}.
If there is no ressource identified by the passed-in key, the
function will fail with an error. To avoid the throw of an exception
when attempting to access to a ressource, take care to check the
existence of the ressource before trying to access to it.
#
Parameters:
key:
identifier of the ressource to access
#
Returns:
  • the ressource associated with the passed-in {VISDOC_CODE_BLOCK_10}
    #
Throws:
  • {VISDOC_LINK_0}{VISDOC_CODE_BLOCK_11} — There is no ressource
    associated with the passed-in key
    #
Specified by:

registerService

public function registerService (
sServiceName:String, service:AbstractServiceProxy) : void

setCredentials

public function setCredentials (
sUserID:String, sPassword:String) : void