Referência do ActionScript® 3.0 para Adobe® Flash® Platform
Início  |  Ocultar listas de Pacotes e Classes |  Pacotes  |  Classes  |  Novidades  |  Índice  |  Apêndices  |  Por que inglês?
Filtros: Recuperando dados do servidor...
Recuperando dados do servidor...
 

Pacote com.adobe.gravity.utility 


Métodos públicos
 FunçãoDefinido por
  
Retrieve a set of services at once.
com.adobe.gravity.utility
  
ungetServices(context:IBundleContext, serviceReferences:Array):void
Release a set of services.
com.adobe.gravity.utility
Detalhe da função

getServices

()função
public function getServices(context:IBundleContext, ... serviceClasses):com.adobe.gravity.utility.async:IToken

Versão da linguagem: ActionScript 3.0
Versão de produto: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
Versões de runtime: AIR 1.1, Flash Player 9

Retrieve a set of services at once. The caller is responsible for releasing all the services thus obtained. If you will be using the services over an extended period of time rather than just over the course of an asynchronous function call, it would generally be more efficient and less error-prone to use ServiceTracker objects. The getServices helper function is intended for use with infrequently called asynchronous APIs.

For example, to retrieve both the IProgressService and the ILocalizedMessageService:

     var token:IToken = getServices(BundleContext.currentContext, IProgressService, ILocalizedMessageService);
     token.addSuccessHandler(doWork);
     token.addFaultHandler(errorHandler);
     

The doWork function must take an array as the first parameter and for each service class specified in the getServices call, an object of the corresponding type. For the above example this would mean

     private function doWork(serviceReferences:Array, progressService:IProgressService, localizedMessageService:ILocalizedMessageService):void
     {
         // do work using progressService and localizedMessageService
     
         // release the references acquired with getServices
         unget(BundleContext.currentContext, serviceReferences);
     }
     

Parâmetros

context:IBundleContext — The bundle context with which to acquire the services.
 
... serviceClasses — The service classes to be acquired.

Retorna
com.adobe.gravity.utility.async:IToken — A token to add success and fault handlers to.

ungetServices

()função 
public function ungetServices(context:IBundleContext, serviceReferences:Array):void

Versão da linguagem: ActionScript 3.0
Versão de produto: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
Versões de runtime: AIR 1.1, Flash Player 9

Release a set of services.

Parâmetros

context:IBundleContext — The bundle context for the bundle releasing the services.
 
serviceReferences:Array — An Array containing IServiceReference objects to be released.

[ X ]Por que inglês?
O conteúdo na Referência do ActionScript 3.0 aparece em inglês

Nem todas as partes da Referência do ActionScript 3.0 estão traduzidas em todos os idiomas. Quando um elemento de um idioma não está traduzido, ele é exibido em inglês. Por exemplo, a classe ga.controls.HelpBox não está traduzida em nenhum idioma. Por isso, na versão da referência em português do Brasil, a classe ga.controls.HelpBox é exibida em inglês.