Package | org.osmf.net.metrics |
Class | public class MetricFactory |
Inheritance | MetricFactory Object |
Subclasses | DefaultMetricFactory |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | 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.
Related API Elements
org.osmf.net.abr.DefaultMetricFactory
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
numItems : Number [read-only]
The number of items
| MetricFactory |
Method | Defined By | ||
---|---|---|---|
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 | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes the specified MetricFactoryItem from the factory. | MetricFactory | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
numItems | property |
MetricFactory | () | Constructor |
public function MetricFactory(qosInfoHistory:QoSInfoHistory)
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor.
ParametersqosInfoHistory:QoSInfoHistory |
addItem | () | method |
public function addItem(item:MetricFactoryItem):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | 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.
Parameters
item:MetricFactoryItem — The MetricFactoryItem to add.
|
Throws
ArgumentError — If the argument is null or if the argument
has a null type field.
|
buildMetric | () | method |
public function buildMetric(type:String, ... args):MetricBase
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Produces a MetricBase.
Parameters
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
|
Throws
Error — If the type is not registered with any MetricFactoryItem.
|
getItem | () | method |
public function getItem(type:String):MetricFactoryItem
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The item corresponding to the specified metric type
Parameters
type:String |
MetricFactoryItem — The item corresponding to the specified type or null if no such item exists
|
getItems | () | method |
public function getItems():Vector.<MetricFactoryItem>
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The registered items
ReturnsVector.<MetricFactoryItem> — A new Vector.<MetricFactoryItem> containing the registered items
|
removeItem | () | method |
public function removeItem(item:MetricFactoryItem):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Removes the specified MetricFactoryItem from the factory. If no such MetricFactoryItem exists in this factory, does nothing.
Parameters
item:MetricFactoryItem — The MetricFactoryItem to remove.
|
Throws
ArgumentError — If the argument is null or if the argument
has a null type field.
|
Thu Dec 6 2018, 01:12 PM -08:00