Lightstreamer .Net Client 2.1.2
|
Subscribes to a table through the Server.
The table is specified by providing item and field names. This requires that a LiteralBasedProvider or equivalent Metadata Adapter is configured on the Server, in order to understand the request.
A fully-featured listener interface is provided.
A distinct listener must be used for any distinct call.
The method is blocking; it returns only after receiving the Server answer upon the request submission; in case a batch is open, this will happen only upon the execution of the batch. See OpenConnection for details on timeout settings.
public: SubscribedTableKey SubscribeTable(ExtendedTableInfo table, IHandyTableListener listener, bool commandLogic);
public virtual SubscribedTableKey SubscribeTable(ExtendedTableInfo table, IHandyTableListener listener, bool commandLogic);
Public virtual Function SubscribeTable(table As ExtendedTableInfo, listener As IHandyTableListener, commandLogic As bool) As SubscribedTableKey
Parameters |
Description |
ExtendedTableInfo table |
Contains the specification and request parameters of the table to subscribe to. A copy of the object is stored internally. |
IHandyTableListener listener |
Receives notification of data updates and subscription termination. |
bool commandLogic |
If true, enables the notification of item updates with "COMMAND logic", as specified in IHandyTableListener. This requires that the items are subscribed to in COMMAND mode or behave equivalently; in particular, that the special "key" and "command" fields are included in the schema. |
A handle to the subscribed table, to be used for unsubscription.
Exceptions |
Description |
if the connection is closed. | |
in case of connection problems. | |
in case of errors in the supplied parameters or in Server answer. In normal conditions, this exception should never happen. | |
in case the Server has refused the connection request because of the constraints imposed either by the Metadata Adapter or by Server configuration. |