Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ContainerSubscriptionParameters

jsprivate

The ContainerSubscriptionParameters is passed as a parameter to the subscribe method in the StreamLink.

name

ContainerSubscriptionParameters

Hierarchy

Index

Methods

select

  • Allow selection, sorting and grouping of containers.

    Example: params.select('bid>123&ask<122', "bid ASC NUMBER, ask DESC NUMBER", "bid" )

    The static ContainerFilterFactory can be used to build a FilterExpression whose toFilterString method will generate a where clause in the required format.

    Note: this method will only work if the backend has the Caplin Refiner installed.

    The following example shows how to build an expression for FIELD1 > 0.1 AND FIELD3 = "a a"

    var exp1 = ContainerFilterFactory.create("FIELD1", FilterExpressionOperator.GREATER_THAN, "0.1");
    var exp2 = ContainerFilterFactory.create("FIELD3", FilterExpressionOperator.EQUAL, "a a");
    var exp1Andexp2 = ContainerFilterFactory.createLogical(FilterExpressionLogicalOperator.AND, exp1, exp2);
    
    

    var subscription = streamLink.subscribe("/container", subscriptionListener, {"select": { "where": exp1Andexp2.toFilterString(), "orderby": "FIELD1" } });

    Parameters

    • where: string

      The where clause, in the form required by Caplin Refiner (example 'bid>123&ask<222').

    • orderBy: string

      The sorting order of the returned container in the form: field [ASC or DESC] [NUMBER or TEXT], ... example: bid DESC NUMBER,ask ASC NUMBER

    • groupBy: string

      The group by clause in the form: field example: bid

    Returns ContainerSubscriptionParameters

    The update ContainerSubscriptionParameters object to permit a fluent programming style.

setFields

setFilter

  • Sets the filter that restricts the the information returned by the subscription. The filtering is performed by the Liberator, rather than the client, so that bandwidth and client side processing are reduced.

    For more details on the format of the filter string, please see the StreamLink Overview document.

    Parameters

    • filter: string

      The filter string.

    • isImage: boolean

      true if the filter string should only be applied to the initial record data (image) supplied in response to the subscription request, false if the filter string should be applied to the initial record and every subsequent update.

    Returns RecordSubscriptionParameters

    The updated RecordSubscriptionParameters object to permit a fluent style.

setKeepInaccessible

  • Sets the subscription to keep elements in the container that are inaccessible.

    Returns ContainerSubscriptionParameters

    The update ContainerSubscriptionParameters object to permit a fluent programming style.

setStructureOnly

  • Sets the subscription to provide only the container structure (no constituent images or updates).

    Returns ContainerSubscriptionParameters

    The update ContainerSubscriptionParameters object to permit a fluent programming style.

setWindow

  • Sets the size of the container window.

    Parameters

    • start: number

      The index of the first container element within the window, where the first container element has an index value of 0 (zero).

    • size: number

      The maximum number of container elements within the window.

    Returns ContainerSubscriptionParameters

    The update ContainerSubscriptionParameters object to permit a fluent programming style.

Generated using TypeDoc