用于 Adobe® Flash® Platform 的 ActionScript® 3.0 参考
主页  |  隐藏包列表和类列表 |   |   |  新增内容  |  索引  |  附录  |  为什么显示为英语?
过滤条件: 正在从服务器检索数据...
正在从服务器检索数据...
 

包 com.adobe.gravity.utility 


公共方法
 函数由以下参数定义
  
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
函数详细信息

getServices

()函数
public function getServices(context:IBundleContext, ... serviceClasses):com.adobe.gravity.utility.async:IToken

语言版本: ActionScript 3.0
产品版本: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
运行时版本: 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);
     }
     

参数

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

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

ungetServices

()函数 
public function ungetServices(context:IBundleContext, serviceReferences:Array):void

语言版本: ActionScript 3.0
产品版本: Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10
运行时版本: AIR 1.1, Flash Player 9

Release a set of services.

参数

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

[ X ]为什么显示为英语?
《ActionScript 3.0 参考》中的内容以英语显示

《ActionScript 3.0 参考》中的部分内容未翻译成所有语言。当某个语言元素未翻译时,将显示为英语。例如,ga.controls.HelpBox 类未翻译成任何语言。因此在简体中文版的参考中,ga.controls.HelpBox 类显示为英语。