套件 | org.osmf.net.metrics |
類別 | public class MetricFactory |
繼承 | MetricFactory Object |
子類別 | DefaultMetricFactory |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The factory operation produces a MetricBase as output.
The MetricFactory maintains a list of MetricFactoryItem objects, each of which encapsulates all the information necessary to create a specific metric.
相關 API 元素
org.osmf.net.abr.DefaultMetricFactory
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
numItems : Number [唯讀]
The number of items
| MetricFactory |
方法 | 定義自 | ||
---|---|---|---|
MetricFactory(qosInfoHistory:QoSInfoHistory)
Constructor. | MetricFactory | ||
Adds the specified MetricFactoryItem to the factory. | MetricFactory | ||
Produces a MetricBase. | MetricFactory | ||
The item corresponding to the specified metric type
| MetricFactory | ||
The registered items
| MetricFactory | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
Removes the specified MetricFactoryItem from the factory. | MetricFactory | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
numItems | 屬性 |
MetricFactory | () | 建構函式 |
public function MetricFactory(qosInfoHistory:QoSInfoHistory)
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Constructor.
參數qosInfoHistory:QoSInfoHistory |
addItem | () | 方法 |
public function addItem(item:MetricFactoryItem):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Adds the specified MetricFactoryItem to the factory. If a MetricFactoryItem with the same ID already exists in this factory, the new MetricFactoryItem object replaces it.
參數
item:MetricFactoryItem — The MetricFactoryItem to add.
|
擲回值
ArgumentError — If the argument is null or if the argument
has a null type field.
|
buildMetric | () | 方法 |
public function buildMetric(type:String, ... args):MetricBase
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Produces a MetricBase.
參數
type:String — The type of the metric to create.
| |
... args — The arguments to be passed to the metric's constructor (except the qosInfoHistory)
|
MetricBase — A new MetricBase of the desired type with the specified parameters
|
擲回值
Error — If the type is not registered with any MetricFactoryItem.
|
getItem | () | 方法 |
public function getItem(type:String):MetricFactoryItem
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The item corresponding to the specified metric type
參數
type:String |
MetricFactoryItem — The item corresponding to the specified type or null if no such item exists
|
getItems | () | 方法 |
public function getItems():Vector.<MetricFactoryItem>
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The registered items
傳回值Vector.<MetricFactoryItem> — A new Vector.<MetricFactoryItem> containing the registered items
|
removeItem | () | 方法 |
public function removeItem(item:MetricFactoryItem):void
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Removes the specified MetricFactoryItem from the factory. If no such MetricFactoryItem exists in this factory, does nothing.
參數
item:MetricFactoryItem — The MetricFactoryItem to remove.
|
擲回值
ArgumentError — If the argument is null or if the argument
has a null type field.
|
Tue Jun 12 2018, 03:47 PM Z