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

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 Methods
 MethodDefined by
  
NonVisualTable(group:*, schema:*, mode:String)
Create an object to be used to describe a data table whose values should be displayed by custom code.
NonVisualTable
  
setCommandLogic(flag:*, command:* = null, key:* = null, underlyingSchema:*, underlyingDataAdapter:String = ""):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
  
setRequestedBufferSize(bufferSize:):void
Setter method that sets the length of Lightstreamer Server's buffer for the internal queueing of updates for each item in the data table.
NonVisualTable
  
setRequestedMaxFrequency(maxFreq:):void
Setter method that sets the maximum update frequency to be requested to Lightstreamer Server for all the items in the data table.
NonVisualTable
  
setSelector(selector:String):void
Setter method that sets the selector name for all the items in the data table.
NonVisualTable
  
setSnapshotRequired(snapshotRequired:):void
Setter method that enables/disables snapshot delivery request for the items in the data table.
NonVisualTable
Events
 EventSummaryDefined by
   Notification that no more snapshot events are coming for an item.NonVisualTable
   Notification of one or more updates that were suppressed in the Server because of internal memory limitations.NonVisualTable
   Notification of an update of the values for an item in the table.NonVisualTable
   Notification of the unsubscription of all the items in the table.NonVisualTable
Constructor detail
NonVisualTable()constructor
public function NonVisualTable(group:*, schema:*, mode:String)

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.
 
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.
 
mode:String — The subscription mode for the items, required by Lightstreamer Server. It could be one of the following: "MERGE", "DISTINCT", "COMMAND", "RAW".

Throws
ConfigurationError — An invalid parameter was specified.

See also

Method detail
setCommandLogic()method
public function setCommandLogic(flag:*, command:* = null, key:* = null, underlyingSchema:*, underlyingDataAdapter:String = ""):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 (default = "") — 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).

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.
setRequestedBufferSize()method 
public function setRequestedBufferSize(bufferSize:):void

Setter method that sets 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 of 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.

Parameters
bufferSize: — The length of the internal queueing buffers to be used in the Server. If a 0 value or the string "unlimited" is supplied, then the buffer length is decided by the Server.

Throws
ConfigurationError — An invalid parameter was specified.
setRequestedMaxFrequency()method 
public function setRequestedMaxFrequency(maxFreq:):void

Setter method that sets 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 method can also be used to request unfiltered dispatching for the items in the data table. However, unfiltered dispatching requests may be refused if any frequency limit is posed on the server side for some item.
Edition Note: A further global frequency limit is also imposed by the Server, if it is running in Presto edition; this specific limit also applies to RAW mode and to unfiltered dispatching.

Edition Note: A further global frequency limit is also imposed by the Server, if it is running in Allegro edition; this specific limit also applies to RAW mode and to unfiltered dispatching.

Edition Note: A further global frequency limit is also imposed by the Server, if it is running in Moderato edition; this specific limit also applies to RAW mode and to unfiltered dispatching.

Parameters
maxFreq:

Throws
ConfigurationError — An invalid parameter was specified.
setSelector()method 
public function setSelector(selector:String):void

Setter method that sets the selector name for all the items in the data table. The selector is a filter on the updates received. It is executed on the Server and implemented by the Metadata Adapter.

Parameters
selector:String — name of a selector, to be recognized by the Metadata Adapter, or null to unset the selector.
setSnapshotRequired()method 
public function setSnapshotRequired(snapshotRequired:):void

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

Parameters
snapshotRequired: — true/false to request/not request snapshot delivery. 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.

Throws
ConfigurationError — An invalid parameter was specified.
Event detail
EndOfSnapshotEventevent 
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.

LostUpdatesEventevent  
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).

NonVisualItemUpdateEventevent  
Event object type: com.lightstreamer.as_client.events.NonVisualItemUpdateEvent

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

UnsubscriptionEventevent  
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.