Packagecom.lightstreamer.as_client
Classpublic class NonVisualTable
InheritanceNonVisualTable Inheritance flash.events.EventDispatcher
Implements Table

A data table that will be fed with real-time data delivered by Lightstreamer Server. The updates will be processed and/or displayed by custom code. The class contains the subscription details and the event handlers needed to process the real-time data. A NonVisualTable cannot be associated to any visual control. All the actions that should be triggered by pushed values can only be performed through the event handlers.



Public Properties
 PropertyDefined By
  binary : Boolean
[read-only] The requested encoding for the field values.
NonVisualTable
  dataAdapter : String
The name of the Data Adapter (within the Adapter Set used by the current session) that supplies all the items in the Group.
NonVisualTable
  groupString : String
[read-only] The subscribed group of items, as requested to the Server.
NonVisualTable
  mode : String
[read-only] The subscription mode for the items.
NonVisualTable
  requestedBufferSize : *
The length of Lightstreamer Server's buffer for the internal queueing of updates for each item in the data table. A queueing buffer is used by the Server to accumulate a burst of updates for an item, so that they can all be sent to the Client, despite bandwidth or frequency limits.
NonVisualTable
  requestedMaxFrequency : *
The maximum update frequency to be requested to Lightstreamer Server for all the items in the data table.
NonVisualTable
  schemaString : String
[read-only] The subscription schema for the items, as requested to the Server.
NonVisualTable
  selector : String
The selector name for all the items in the data table, or null if no selector is needed. The selector is a filter on the updates received.
NonVisualTable
  snapshotRequired : *
Setter method that enables/disables snapshot delivery request Indicates whether or not to request snapshot delivery for the items in the data table.
NonVisualTable
Public Methods
 MethodDefined By
  
NonVisualTable(group:*, schema:*, mode:String, binary:Boolean = false)
Create an object to be used to describe a data table whose values should be displayed by custom code.
NonVisualTable
  
Recalls the final index, if a range of items has been set.
NonVisualTable
  
Recalls the starting index, if a range of items has been set.
NonVisualTable
  
setCommandLogic(flag:*, command:* = null, key:* = null, underlyingSchema:*, underlyingDataAdapter:String, underlyingBinary:Boolean = false):void
Configures the "COMMAND logic" behaviour.
NonVisualTable
  
setItemRange(start:uint, end:uint):void
Setter method that sets a range of items within the specified group.
NonVisualTable
Events
 Event Summary Defined By
  NonVisualTable
  NonVisualTable
  Notification of an update of the values for an item in the table.NonVisualTable
  NonVisualTable
  NonVisualTable
  NonVisualTable
Property Detail
binaryproperty
binary:Boolean  [read-only]

The requested encoding for the field values. It can be defined only at object creation.


Implementation
    public function get binary():Boolean
dataAdapterproperty 
dataAdapter:String

The name of the Data Adapter (within the Adapter Set used by the current session) that supplies all the items in the Group. If not set, the "DEFAULT" name is used.

The Data Adapter name is configured on the server side through the "name" attribute of the "data_provider" element, in the "adapters.xml" file which defines the Adapter Set. Omitting the attribute configures the "DEFAULT" name.

Note: If more than one Data Adapter is needed to supply all the items in a set of items, then it is not possible to group all the items of the set in a single Table. Multiple tables have to be defined.


Implementation
    public function get dataAdapter():String
    public function set dataAdapter(value:String):void
groupStringproperty 
groupString:String  [read-only]

The subscribed group of items, as requested to the Server. The group can be defined only at object creation, as either an Array of item names or a String group identifier.


Implementation
    public function get groupString():String
modeproperty 
mode:String  [read-only]

The subscription mode for the items. It can be defined only at object creation.


Implementation
    public function get mode():String
requestedBufferSizeproperty 
requestedBufferSize:*

The length of Lightstreamer Server's buffer for the internal queueing of updates for each item in the data table.

A queueing buffer is used by the Server to accumulate a burst of updates for an item, so that they can all be sent to the Client, despite bandwidth or frequency limits. It can be used only when the subscription mode is MERGE or DISTINCT and unfiltered dispatching has not been requested.

Note that the Server may pose an upper limit on the size of its internal buffers. If a 0 value or the string "unlimited" is set, then the buffer length is decided by the Server.


Implementation
    public function get requestedBufferSize():*
    public function set requestedBufferSize(value:any):void

Throws
ConfigurationError — An invalid parameter is being set.
requestedMaxFrequencyproperty 
requestedMaxFrequency:*

The maximum update frequency to be requested to Lightstreamer Server for all the items in the data table. It can be used only if the subscription mode is MERGE, DISTINCT or COMMAND (in the latter case, the frequency limitation applies to the UPDATE events for each single key). Note that frequency limits on the items can also be set on the server side and this request can only be issued in order to further reduce the frequency, not to rise it beyond these limits.

This property can also be used to request unfiltered dispatching for the items in the data table, if the string "unfiltered" is set. However, unfiltered dispatching requests may be refused if any frequency limit is posed on the server side for some item. If a 0 value or the string "unlimited" is set, then the update frequency is decided by the Server.

Edition Note: A further global frequency limit could also be imposed by the Server, depending on Edition and License Type; this specific limit also applies to RAW mode and to unfiltered dispatching.


Implementation
    public function get requestedMaxFrequency():*
    public function set requestedMaxFrequency(value:any):void

Throws
ConfigurationError — An invalid parameter is being set.
schemaStringproperty 
schemaString:String  [read-only]

The subscription schema for the items, as requested to the Server. The schema can be defined only at object creation, as either an Array of field names or a String schema identifier.


Implementation
    public function get schemaString():String
selectorproperty 
selector:String

The selector name for all the items in the data table, or null if no selector is needed.

The selector is a filter on the updates received. It is executed on the Server and implemented by the Metadata Adapter.


Implementation
    public function get selector():String
    public function set selector(value:String):void
snapshotRequiredproperty 
snapshotRequired:*

Setter method that enables/disables snapshot delivery request Indicates whether or not to request snapshot delivery for the items in the data table. The snapshot can be requested only if the subscription mode is MERGE, DISTINCT or COMMAND.

If the subscription mode is DISTINCT, instead of true, it is also possible to supply a number, to specify the requested length (depth) of the snapshot (though the length of the received snapshot may be less than requested, because of insufficient data or server side limits); specifying true means that the snapshot length should be determined only by the Server.


Implementation
    public function get snapshotRequired():*
    public function set snapshotRequired(value:any):void

Throws
ConfigurationError — An invalid parameter is being set.
Constructor Detail
NonVisualTable()Constructor
public function NonVisualTable(group:*, schema:*, mode:String, binary:Boolean = false)

Create an object to be used to describe a data table whose values should be displayed by custom code. The object can be supplied to LSClient.subscribeTable() and LSClient.unsubscribeTable(), in order to subscribe/unsubscribe to/from it on the Server.

Parameters
group:* — An Array of item names or a String group identifier. In the first case items can be accessed by name during event dispatching; however, a LiteralBasedProvider or equivalent Metadata Adapter is needed on the Server in order to understand the subscription request. Note that item names can't be empty or null and can't contain spaces.
 
schema:* — An Array of field names or a String schema identifier. In the first case fields can be accessed by name during event dispatching, otherwise field indexes should be used. However, in the first case, a LiteralBasedProvider or equivalent Metadata Adapter is needed on the Server in order to understand the subscription request. Note that field names can't be empty or null and can't contain spaces.
 
mode:String — The subscription mode for the items, required by Lightstreamer Server. It could be one of the following: "MERGE", "DISTINCT", "COMMAND", "RAW".
 
binary:Boolean (default = false) — If true, the values received for all the subscribed fields are interpreted as binary AMF representations of objects; they have to be supplied in that form by the Data Adapter, for all the subscribed items. Only in case mode is "COMMAND", the special "key" and "command" fields (which can only be supplied as strings by the Data Adapter) are managed as text values.

Note that items suitable for subscription in binary form are not suitable for subscription in non-binary (i.e. text) form and vice-versa.

The parameter is optional and the default value is false, which means that all fields are managed as text values.


Throws
ConfigurationError — An invalid parameter was specified.

See also

Method Detail
getRangeEnd()method
public function getRangeEnd():uint

Recalls the final index, if a range of items has been set.

Returns
uint — a 1-based index or 0 if no range has been set.
getRangeStart()method 
public function getRangeStart():uint

Recalls the starting index, if a range of items has been set.

Returns
uint — a 1-based index or 0 if no range has been set.
setCommandLogic()method 
public function setCommandLogic(flag:*, command:* = null, key:* = null, underlyingSchema:*, underlyingDataAdapter:String, underlyingBinary:Boolean = false):void

Configures the "COMMAND logic" behaviour. By enabling the "COMMAND logic" behaviour, it is possible to specify the COMMAND subscription mode and have the data table managed according to the special values of the "key" and "command" fields. In particular, in the received update notifications, the update values will be compared with the previous values with reference to the same key.

If a field name array has been used as schema descriptor for the data table, then the "command" and "key" field should be included in the array. If, however, a schema identifier has been used as schema descriptor, then the positions of these two fields have to be supplied through this method.

Note: using a different subscription mode is possible, provided that the special "key" and "command" fields are still available and valued properly.

Parameters

flag:* — true/false to enable/disable "COMMAND logic" behaviour. Setting it to the string "MULTI" enables the "MultiMetapush logic" behavior, which is a two-level extension of the "COMMAND logic" behavior, as explained for the "setMultiMetapush" method of "VisualTable". The updates of the whole two-level data table will be made available through the normal "NonVisualItemUpdateEvent".
 
command:* (default = null) — the field name or index of the "command" field. This parameter is only effective when flag is true or "MULTI"; anyway, it is optional and the default value is "command" if an array of items was given in the constructor, 2 otherwise.
 
key:* (default = null) — the field name or index of the "key" field. This parameter is only effective when flag is true or "MULTI"; anyway, it is optional and the default value is "key" if an array of items was given in the constructor, 1 otherwise.
 
underlyingSchema:* — An Array of field names or a String schema identifier. This parameter is only effective when "MultiMetapush logic" behaviour has been configured (i.e. flag is "MULTI"). It identifies the fields provided by the second-level items. The second-level field names should better be different from the first-level field names, so that no name conflict can arise and accessing the field values from the "NonVisualItemUpdateEvent" is easier.

If an Array is supplied, a LiteralBasedProvider or equivalent Metadata Adapter is needed on the Server in order to understand the subscription request.

Note that the first-level and second-level schemas must be declared in the same way, i.e. both through an Array of field names of both through a schema identifier.

 
underlyingDataAdapter:String — the name of a Data Adapter (within the Adapter Set used by the current session). This parameter is only effective when "MultiMetapush logic" behaviour has been configured (i.e. flag is "MULTI"). It identifies the underlying Data Adapter, which supplies all the second-level items; the parameter is optional and the default is the "DEFAULT" name. All the possible second-level items should be supplied in "MERGE" mode with snapshot available.

The Data Adapter name is configured on the server side through the "name" attribute of the "data_provider" element, in the "adapters.xml" file that defines the Adapter Set (a missing attribute configures the "DEFAULT" name).

 
underlyingBinary:Boolean (default = false) — If true, the values received for all the second-level subscribed fields are interpreted as binary AMF representations of objects; they have to be supplied in that form by the Data Adapter, for all the possible second-level items.

Note that items suitable for subscription in binary form are not suitable for subscription in non-binary (i.e. text) form and vice-versa.

This parameter is only effective when "MultiMetapush logic" behaviour has been configured (i.e. flag is "MULTI"). The parameter is optional and the default value is false, which means that all fields are managed as text values.

See also

setItemRange()method 
public function setItemRange(start:uint, end:uint):void

Setter method that sets a range of items within the specified group. Items outside of this range are not subscribed to. The support for ranges allows the front-end to use generic group identifiers as group descriptors, yet being able to subscribe to subsets of such groups or even to single items from such groups, without the need to introduce more specific group identifiers.

Moreover, this method allows for continually resubscribing different item subsets without the need for creating different data table objects.

Parameters

start:uint — 1-based index of the first item in the group that has to be subscribed to.
 
end:uint — 1-based index of the last item in the group that has to be subscribed to.


Throws
ConfigurationError — An invalid parameter was specified.
Event Detail
EndOfSnapshotEvent Event
Event Object Type: com.lightstreamer.as_client.events.EndOfSnapshotEvent

Notification that no more snapshot events are coming for an item. This notification is always received once, when the item is subscribed in DISTINCT or COMMAND mode and the snapshot is requested.

LostUpdatesEvent Event  
Event Object Type: com.lightstreamer.as_client.events.LostUpdatesEvent

Notification of one or more updates that were suppressed in the Server because of internal memory limitations. The notification can be sent if the subscription mode is RAW or COMMAND. It can also be sent if the subscription mode is MERGE or DISTINCT and unfiltered dispatching has been requested. In all these cases, an update loss may be unacceptable for the client (in filtered COMMAND mode, this applies to "add" and "delete" events only).

NonVisualItemUpdateEvent Event  
Event Object Type: com.lightstreamer.as_client.events.NonVisualItemUpdateEvent
NonVisualItemUpdateEvent.type property = com.lightstreamer.as_client.events.NonVisualItemUpdateEvent.NON_VISUAL_ITEM_UPDATE

Notification of an update of the values for an item in the table.

Define the value of the type property of a NonVisualItemUpdate event object.
SubscriptionErrorEvent Event  
Event Object Type: com.lightstreamer.as_client.events.SubscriptionErrorEvent

Notification of a Server error in response to a subscription request.

SubscriptionEvent Event  
Event Object Type: com.lightstreamer.as_client.events.SubscriptionEvent

Notification of the accomplished subscription of all the items in the table. The notification is sent before any notification related with the updates.

UnsubscriptionEvent Event  
Event Object Type: com.lightstreamer.as_client.events.UnsubscriptionEvent

Notification of the unsubscription of all the items in the table. The unsubscription may be subsequent to an unsubscribeTable call or to the closure of the connection.