包 | com.adobe.gravity.tracker |
类 | public class ServiceTracker |
继承 | ServiceTracker EventDispatcher Object |
实现 | IServiceTrackerCustomizer |
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
属性 | 由以下参数定义 | ||
---|---|---|---|
constructor : Object
对类对象或给定对象实例的构造函数的引用。 | Object | ||
service : Object [只读]
The highest-ranked service that matches the tracking criteria. | ServiceTracker | ||
services : Array [只读]
The set of services that are being tracked, in ranking order. | ServiceTracker | ||
size : uint [只读]
The number of services that currently match the tracking criteria. | ServiceTracker | ||
trackingCount : uint [只读]
A number that increments every time the set of tracked services changes. | ServiceTracker |
属性 | 由以下参数定义 | ||
---|---|---|---|
context : IBundleContext [只读]
The bundle context for this tracker. | ServiceTracker | ||
filter : IFilter [只读]
The service filter that this tracker is using, if any. | ServiceTracker |
方法 | 由以下参数定义 | ||
---|---|---|---|
ServiceTracker(context:IBundleContext, serviceInterface:Class, filter:IFilter = null, customizer:com.adobe.gravity.tracker:IServiceTrackerCustomizer = null)
Constructor. | ServiceTracker | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | EventDispatcher | ||
Called when a new service appears that is to be tracked. | ServiceTracker | ||
Stop tracking services. | ServiceTracker | ||
将事件调度到事件流中。 | EventDispatcher | ||
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。 | EventDispatcher | ||
表示对象是否已经定义了指定的属性。 | Object | ||
表示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | ||
Called when service properties are modified. | ServiceTracker | ||
Start tracking services. | ServiceTracker | ||
表示指定的属性是否存在、是否可枚举。 | Object | ||
Called when a service is no longer to be tracked. | ServiceTracker | ||
从 EventDispatcher 对象中删除侦听器。 | EventDispatcher | ||
设置循环操作动态属性的可用性。 | Object | ||
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。 | Object | ||
返回指定对象的字符串表示形式。 | Object | ||
返回指定对象的原始值。 | Object | ||
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。 | EventDispatcher |
context | 属性 |
context:IBundleContext
[只读] 语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
The bundle context for this tracker.
实现
protected function get context():IBundleContext
filter | 属性 |
service | 属性 |
service:Object
[只读] 语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
The highest-ranked service that matches the tracking criteria.
此属性可用作数据绑定的源。修改此属性后,将调度 serviceChanged
事件。
实现
public function get service():Object
services | 属性 |
services:Array
[只读] 语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
The set of services that are being tracked, in ranking order.
此属性可用作数据绑定的源。修改此属性后,将调度 servicesChanged
事件。
实现
public function get services():Array
size | 属性 |
size:uint
[只读] 语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
The number of services that currently match the tracking criteria.
此属性可用作数据绑定的源。修改此属性后,将调度 sizeChanged
事件。
实现
public function get size():uint
trackingCount | 属性 |
trackingCount:uint
[只读] 语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
A number that increments every time the set of tracked services changes. Can be used to check whether there have been changes to the set of tracked services.
此属性可用作数据绑定的源。修改此属性后,将调度 trackingCountChanged
事件。
实现
public function get trackingCount():uint
ServiceTracker | () | 构造函数 |
public function ServiceTracker(context:IBundleContext, serviceInterface:Class, filter:IFilter = null, customizer:com.adobe.gravity.tracker:IServiceTrackerCustomizer = null)
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
Constructor.
参数context:IBundleContext — A bundle context for performing service operations.
| |
serviceInterface:Class — The interface for the services to be tracked.
| |
filter:IFilter (default = null ) — An optional filter to constrain the set of tracked services.
| |
customizer:com.adobe.gravity.tracker:IServiceTrackerCustomizer (default = null ) — An IServiceTrackerCustomizer with which to customize the behaviour of this tracker.
|
addingService | () | 方法 |
public function addingService(reference:IServiceReference):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 |
Called when a new service appears that is to be tracked. Note that implementations of this method must retrieve the service object from the service registry. The simplest implementation would be
public function addingService(reference:IServiceReference):IToken { return BundleContext.currentContext.getService(reference); }
参数
reference:IServiceReference — The reference for the new service.
|
com.adobe.gravity.utility.async:IToken — A token used to set success and failure handlers to be called when the operation has completed. The success handler must be called with the object to be returned by the tracker as the service object.
|
close | () | 方法 |
public function close():void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
Stop tracking services.
modifiedService | () | 方法 |
public function modifiedService(reference:IServiceReference, service:Object):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
Called when service properties are modified.
参数
reference:IServiceReference — The reference for the service.
| |
service:Object — The service object.
|
open | () | 方法 |
public function open():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 |
Start tracking services.
返回com.adobe.gravity.utility.async:IToken — A token used to set success and failure handlers to be called when the operation has completed. Success handlers will be called with no parameters.
|
removedService | () | 方法 |
public function removedService(reference:IServiceReference, service:Object):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Client Component Framework 10 |
运行时版本: | AIR 1.1, Flash Player 9 |
Called when a service is no longer to be tracked. Note that implementations must release the service object from the service registry. The simplest implementation would be
public function removedService(reference:IServiceReference, service:Object):void { BundleContext.currentContext.ungetService(reference); }
参数
reference:IServiceReference | |
service:Object |
Tue Jun 12 2018, 11:04 AM Z