com.lightstreamer.javameclient.midp
Class SimpleTableInfo

java.lang.Object
  extended by com.lightstreamer.javameclient.midp.SimpleTableInfo
Direct Known Subclasses:
ExtendedTableInfo

public class SimpleTableInfo
extends java.lang.Object

Bean object that contains the specification of a table to be subscribed to.


Field Summary
static java.lang.String COMMAND
          String constant for COMMAND subscription mode.
static java.lang.String DISTINCT
          String constant for DISTINCT subscription mode.
static java.lang.String MERGE
          String constant for MERGE subscription mode.
static java.lang.String RAW
          String constant for RAW subscription mode.
 
Constructor Summary
SimpleTableInfo(java.lang.String group, java.lang.String schema, java.lang.String mode)
          Constructs a table specification with basic table attributes.
 
Method Summary
 void setDataAdapter(java.lang.String dataAdapter)
          Specifies the name of the Data Adapter (within the Adapter Set used by the current session) that supplies all the items in the Group.
 void setDistinctSnapshotLength(int snapshotLength)
          Setter method that sets the snapshot length requested to be requested to Lightstreamer Server for all the items in the table (though the length of the received snapshot may be less than requested, because of insufficient data or server side limits).
 void setItemsRange(int start, int end)
          Setter method that sets a range of items within the specified group.
 void setRequestedBufferSize(int bufferSize)
          Setter method that sets the length of Lightstreamer Server's buffer for the internal queueing of updates for each item in the data table.
 void setRequestedMaxFrequency(int maxFrequency)
          Setter method that sets the maximum update frequency to be requested to Lightstreamer Server for all the items in the table.
 void setSelector(java.lang.String selector)
          Specifies a selector to be applied by the Server to the updates pertaining to all the Items in the Group.
 void setSnaspshotRequired(boolean required)
          Setter method that enables/disables snapshot delivery request for the items in the data table.
 void setUnfilteredMaxFrequency()
          Setter method that can be used to request unfiltered dispatching for the items in the table.
 void setUnlimitedBufferSize()
          Setter method that sets to unlimited the length of the internal queueing buffers to be requested to Lightstreamer Server for the items in the data table.
 void setUnlimitedMaxFrequency()
          Setter method that can be used to remove settings of setRequestedMaxFrequency(int) and setUnfilteredMaxFrequency() This way the maximum frequency is decided by the Server.
 java.lang.String toString()
          Returns a string representation of the table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MERGE

public static final java.lang.String MERGE
String constant for MERGE subscription mode.

See Also:
Constant Field Values

DISTINCT

public static final java.lang.String DISTINCT
String constant for DISTINCT subscription mode.

See Also:
Constant Field Values

RAW

public static final java.lang.String RAW
String constant for RAW subscription mode.

See Also:
Constant Field Values

COMMAND

public static final java.lang.String COMMAND
String constant for COMMAND subscription mode.

See Also:
Constant Field Values
Constructor Detail

SimpleTableInfo

public SimpleTableInfo(java.lang.String group,
                       java.lang.String schema,
                       java.lang.String mode)
Constructs a table specification with basic table attributes.

Parameters:
group - Name of the Group of items in the table. It will be interpreted by the Metadata Adapter.
schema - Name of the Schema for all items in the table. It will be interpreted by the Metadata Adapter.
mode - Subscription mode for all items in the table. Can be one of the following:

RAW

MERGE

DISTINCT

COMMAND

Method Detail

setSelector

public void setSelector(java.lang.String selector)
Specifies a selector to be applied by the Server to the updates pertaining to all the Items in the Group.

Parameters:
selector - name of a Selector. It will be interpreted by the Metadata Adapter.

setDataAdapter

public void setDataAdapter(java.lang.String dataAdapter)
Specifies 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 called, 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 that defines the Adapter Set (a missing 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 logical table. Multiple logical tables have to be defined.

Parameters:
dataAdapter - the name of the Data Adapter. A null value is equivalent to the "DEFAULT" name.
See Also:
ConnectionInfo.setAdapter(java.lang.String)

setRequestedBufferSize

public void setRequestedBufferSize(int bufferSize)
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. Setting this method overrides setUnlimitedBufferSize()

Parameters:
bufferSize - the size requested for the ItemEventBuffers.
See Also:
setUnlimitedBufferSize(), setRequestedMaxFrequency(int)

setUnlimitedBufferSize

public void setUnlimitedBufferSize()
Setter method that sets to unlimited the length of the internal queueing buffers to be requested to Lightstreamer Server for the items in the data table. 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. Setting this method overrides setRequestedBufferSize(int)

See Also:
setRequestedBufferSize(int), setRequestedMaxFrequency(int)

setRequestedMaxFrequency

public void setRequestedMaxFrequency(int maxFrequency)
Setter method that sets the maximum update frequency to be requested to Lightstreamer Server for all the items in the 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 furtherly reduce the frequency, not to rise it beyond these limits. Setting this method overrides setUnlimitedMaxFrequency() and setUnfilteredMaxFrequency()

Parameters:
maxFrequency - the frequency requested for the items.
See Also:
setUnlimitedMaxFrequency(), setUnfilteredMaxFrequency()
Edition Note:
A further global frequency limit is also imposed by the Server, if it is running in Presto edition.

setUnfilteredMaxFrequency

public void setUnfilteredMaxFrequency()
Setter method that can be used to request unfiltered dispatching for the items in the table. Unfiltered dispatching requests may be refused if any frequency limit is posed on the server side for some item. Setting this method overrides setUnlimitedMaxFrequency() and setRequestedMaxFrequency(int)

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.

setUnlimitedMaxFrequency

public void setUnlimitedMaxFrequency()
Setter method that can be used to remove settings of setRequestedMaxFrequency(int) and setUnfilteredMaxFrequency() This way the maximum frequency is decided by the Server.

Edition Note:
A further global frequency limit is also imposed by the Server, if it is running in Presto edition.

setSnaspshotRequired

public void setSnaspshotRequired(boolean required)
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. Note if the mode is DISTINCT you can also use setDistinctSnapshotLength(int) to specify the requested length of the snapshot.

Parameters:
required - true/false to request/not request snapshot delivery. If false this method will also override setDistinctSnapshotLength settings.

setDistinctSnapshotLength

public void setDistinctSnapshotLength(int snapshotLength)
Setter method that sets the snapshot length requested to be requested to Lightstreamer Server for all the items in the table (though the length of the received snapshot may be less than requested, because of insufficient data or server side limits). This method sets setSnaspshotRequired(boolean) to true

Parameters:
snapshotLength - the requested length of the snapshot

setItemsRange

public void setItemsRange(int start,
                          int end)
Setter method that sets a range of items within the specified group. Items outside of this range are not subscribed. 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.

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

toString

public java.lang.String toString()
Returns a string representation of the table. It is composed with his superclass method plus the basic table attributes (group schema and mode) surrounded by square brackets.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the table with basic table attributes.