StreamLink for iOS  8.0.0.233163-35883203
<SLParametersFactory > Protocol Reference

A factory that creates subscription parameter objects. More...

Inheritance diagram for <SLParametersFactory >:

Instance Methods

(id< SLSubscriptionParameters >) - createRecordSubscriptionParametersWithFields:
 Creates parameters for a record subscription, specifying the fields to subscribe to. More...
 
(id< SLSubscriptionParameters >) - createRecordSubscriptionParametersWithFields:filter:
 Creates parameters for a record subscription, specifying the fields to subscribe to and a filter to apply to the subscription. More...
 
(id< SLSubscriptionParameters >) - createRecordSubscriptionParametersWithFields:imageFilter:
 Creates parameters for a record subscription, specifying the fields to subscribe to and an image filter to apply to the subscription. More...
 
(id< SLSubscriptionParameters >) - createRecordSubscriptionParametersWithFilter:
 Creates parameters for a record subscription, specifying that all fields are to be returned, but applying a given filter. More...
 
(id< SLSubscriptionParameters >) - createRecordSubscriptionParametersWithImageFilter:
 Creates parameters for a record subscription, specifying that all fields are to be returned, but applying a given image filter. More...
 
(id< SLSubscriptionParameters >) - createJsonSubscriptionParametersWithFilter:
 Creates parameters for a JSON subscription, specifying a JSON path filter. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParameters
 Creates parameters for a container subscription. All fields are returned for all the records in the container. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithWindowStart:size:
 Creates parameters for a container subscription, specifying the start record and size for the container window. All fields are returned for records currently in the container window. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithRecordParameters:
 Creates parameters for a container subscription, such that only particular specified record constituents are returned. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithWindowStart:size:recordParameters:
 Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithWindowStart:size:recordParameters:structureOnly:keepInaccessible:
 Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithRecordParameters:selectWith:orderBy:groupBy:
 Creates parameters for a container subscription, such that only particular specified record constituents are returned. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithWindowStart:size:recordParameters:selectWith:orderBy:groupBy:
 Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window. More...
 
(id< SLSubscriptionParameters >) - createContainerSubscriptionParametersWithWindowStart:size:recordParameters:selectWith:orderBy:groupBy:structureOnly:keepInaccessible:
 Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window. More...
 

Detailed Description

A factory that creates subscription parameter objects.

Subscription parameters allow your application to restrict the number of updates that it receives from the Liberator.

Method Documentation

- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParameters

Creates parameters for a container subscription. All fields are returned for all the records in the container.

- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithRecordParameters: (id< SLSubscriptionParameters >)  recordParameters

Creates parameters for a container subscription, such that only particular specified record constituents are returned.

Parameters
recordParameters- An SLSubscriptionParameters for records. This should be created using one of the createRecordSubscriptionParameters... methods. The record subscription parameters can be used to select the particular fields returned or to filter the data.
- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithRecordParameters: (id< SLSubscriptionParameters >)  recordParameters
selectWith: (NSString *)  selectWith
orderBy: (NSString *)  orderBy
groupBy: (NSString *)  groupBy 

Creates parameters for a container subscription, such that only particular specified record constituents are returned.

Parameters
recordParameters- An SLSubscriptionParameters for records. This should be created using one of the createRecordSubscriptionParameters... methods. The record subscription parameters can be used to select the particular fields returned or to filter the data.
selectWithThe where clause, in the form required by Caplin Refiner (example 'bid>123&ask<222').
orderByThe sorting order of the returned container in the form: field [ASC or DESC] [NUMBER or TEXT], ... example: bid DESC NUMBER,ask ASC NUMBER
groupByThe group by clause in the form: field [,field] example: bid,ask
- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithWindowStart: (int)  start
size: (int)  size 

Creates parameters for a container subscription, specifying the start record and size for the container window. All fields are returned for records currently in the container window.

Parameters
start- The index value, within the container, of the first element to appear in the window when the container subscription is created. Note that the first record within the container has an index value of zero (0).
size- The size of the window in elements.
- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithWindowStart: (int)  start
size: (int)  size
recordParameters: (id< SLSubscriptionParameters >)  recordParameters 

Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window.

Parameters
start- The index value, within the container, of the first element to appear in the window when the container subscription is created. Note that the first element within the container has an index value of zero (0).
size- The size of the window in elements.
recordParameters- An SLSubscriptionParameters for records This should be created using one of the createRecordSubscriptionParameters... methods). The record subscription parameters can be used to select the particular fields returned or to filter the data.
- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithWindowStart: (int)  start
size: (int)  size
recordParameters: (id< SLSubscriptionParameters >)  recordParameters
selectWith: (NSString *)  selectWith
orderBy: (NSString *)  orderBy
groupBy: (NSString *)  groupBy 

Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window.

Parameters
start- The index value, within the container, of the first element to appear in the window when the container subscription is created. Note that the first element within the container has an index value of zero (0).
size- The size of the window in elements.
recordParameters- An SLSubscriptionParameters for records This should be created using one of the createRecordSubscriptionParameters... methods). The record subscription parameters can be used to select the particular fields returned or to filter the data.
selectWithThe where clause, in the form required by Caplin Refiner (example 'bid>123&ask<222').
orderByThe sorting order of the returned container in the form: field [ASC or DESC] [NUMBER or TEXT], ... example: bid DESC NUMBER,ask ASC NUMBER
groupByThe group by clause in the form: field [,field] example: bid,ask
- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithWindowStart: (int)  start
size: (int)  size
recordParameters: (id< SLSubscriptionParameters >)  recordParameters
selectWith: (NSString *)  selectWith
orderBy: (NSString *)  orderBy
groupBy: (NSString *)  groupBy
structureOnly: (BOOL)  structureOnly
keepInaccessible: (BOOL)  keepInaccessible 

Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window.

Parameters
start- The index value, within the container, of the first element to appear in the window when the container subscription is created. Note that the first element within the container has an index value of zero (0).
size- The size of the window in elements.
recordParameters- An SLSubscriptionParameters for records This should be created using one of the createRecordSubscriptionParameters... methods). The record subscription parameters can be used to select the particular fields returned or to filter the data.
selectWithThe where clause, in the form required by Caplin Refiner (example 'bid>123&ask<222').
orderByThe sorting order of the returned container in the form: field [ASC or DESC] [NUMBER or TEXT], ... example: bid DESC NUMBER,ask ASC NUMBER
groupByThe group by clause in the form: field [,field] example: bid,ask
structureOnly- If TRUE, then only the container structure will be returned, no constituents are returned
keepInaccessible- If TRUE, then constituents that should be removed as a result of not being available or permission has been denied will not be removed from the constituent list.
- (id<SLSubscriptionParameters> SLParametersFactory) createContainerSubscriptionParametersWithWindowStart: (int)  start
size: (int)  size
recordParameters: (id< SLSubscriptionParameters >)  recordParameters
structureOnly: (BOOL)  structureOnly
keepInaccessible: (BOOL)  keepInaccessible 

Creates parameters for a container subscription, specifying the start element and size for the container window. Only particular specified record constituents are returned for records currently in the container window.

Parameters
start- The index value, within the container, of the first element to appear in the window when the container subscription is created. Note that the first element within the container has an index value of zero (0).
size- The size of the window in elements.
recordParameters- An SLSubscriptionParameters for records This should be created using one of the createRecordSubscriptionParameters... methods). The record subscription parameters can be used to select the particular fields returned or to filter the data.
structureOnly- If TRUE, then only the container structure will be returned, no constituents are returned
keepInaccessible- If TRUE, then constituents that should be removed as a result of not being available or permission has been denied will not be removed from the constituent list.
- (id<SLSubscriptionParameters> SLParametersFactory) createJsonSubscriptionParametersWithFilter: (NSString *)  filter

Creates parameters for a JSON subscription, specifying a JSON path filter.

Parameters
filter- The filter to apply to the subscription.

For more details on the format of the filter string, please see https://goessner.net/articles/JsonPath/.

#import <StreamLink/StreamLink.h>
@interface ExampleCreateJsonParameters : NSObject {
}
@end
@implementation ExampleCreateJsonParameters
-(void)createJsonParameters
{
// Create a streamlink instance that connects to the server "myliberator" with password credentials
id<SLStreamLink> streamLink = [SLStreamLinkFactory createStreamLinkWithConfiguration:@"https://myliberator" username:@"admin" password:@"admin"];
// We wish to subscribe to the first 3 entries in the book array
NSString *filter = @"$..book[0,1,2]";
// Create a set of subscription parameters which can then be used
id<SLSubscriptionParameters> parameters = [[streamLink parametersFactory] createJsonSubscriptionParametersWithFilter:filter];
NSLog(@"Parameters %@", parameters.description);
}
@end
- (id<SLSubscriptionParameters> SLParametersFactory) createRecordSubscriptionParametersWithFields: (NSArray< NSString * > *)  fields

Creates parameters for a record subscription, specifying the fields to subscribe to.

Parameters
fields- The fields to subscribe to in the record.

The following example shows how to create an SLSubscriptionParameters which can be applied to a record so that when the record has been subscribed to, Liberator only provides updates for the Bid and Ask fields.

#import <StreamLink/StreamLink.h>
@interface ExampleCreateRecordParameters : NSObject {
}
@end
@implementation ExampleCreateRecordParameters
-(void)createRecordParameters
{
// Create a streamlink instance that connects to the server "myliberator" with password credentials
id<SLStreamLink> streamLink = [SLStreamLinkFactory createStreamLinkWithConfiguration:@"https://myliberator" username:@"admin" password:@"admin"];
// We wish to subscribe to the fields Bid and Ask
NSArray *fields = [NSArray arrayWithObjects:@"Bid", @"Ask", nil];
// Create a set of subscription parameters which can then be used
id<SLSubscriptionParameters> parameters = [[streamLink parametersFactory] createRecordSubscriptionParametersWithFields:fields];
NSLog(@"Parameters %@", parameters.description);
}
@end
- (id<SLSubscriptionParameters> SLParametersFactory) createRecordSubscriptionParametersWithFields: (NSArray< NSString * > *)  fields
filter: (NSString *)  filter 

Creates parameters for a record subscription, specifying the fields to subscribe to and a filter to apply to the subscription.

Parameters
fields- The fields to subscribe to in the record. See the example in createRecordSubscriptionParametersWithFields:fields
filter- The filter to apply to the subscription.

A filter restricts the number of field updates that will be received. For example the filter (dLast >50) & (dVolumeAcc > 1000) means that the Liberator will only send updates to your application when the value of the field dLast is greater than 50 and the dVolumeAcc field is greater than 1000.

For more information on the filtering syntax, see the Caplin StreamLink 5.0 Overview.

- (id<SLSubscriptionParameters> SLParametersFactory) createRecordSubscriptionParametersWithFields: (NSArray< NSString * > *)  fields
imageFilter: (NSString *)  imageFilter 

Creates parameters for a record subscription, specifying the fields to subscribe to and an image filter to apply to the subscription.

Parameters
fields- The fields to subscribe to in the record. See the example in createRecordSubscriptionParametersWithFields:fields
imageFilter- The image filter to apply to the subscription.

A filter restricts the number of field updates that will be received. For example the filter (dLast >50) & (dVolumeAcc > 1000) means that the Liberator will only send updates to your application when the value of the field dLast is greater than 50 and the dVolumeAcc field is greater than 1000.

For more information on the filtering syntax, see the Caplin StreamLink 5.0 Overview.

- (id<SLSubscriptionParameters> SLParametersFactory) createRecordSubscriptionParametersWithFilter: (NSString *)  filter

Creates parameters for a record subscription, specifying that all fields are to be returned, but applying a given filter.

Parameters
filter- The filter to apply to the subscription.

A filter restricts the number of field updates that will be received. For example the filter (dLast >50) & (dVolumeAcc > 1000) means that the Liberator will only send updates to your application when the value of the field dLast is greater than 50 and the dVolumeAcc field is greater than 1000.

For more information on the filtering syntax, see the Caplin StreamLink 5.0 Overview.

- (id<SLSubscriptionParameters> SLParametersFactory) createRecordSubscriptionParametersWithImageFilter: (NSString *)  imageFilter

Creates parameters for a record subscription, specifying that all fields are to be returned, but applying a given image filter.

Parameters
imageFilter- The image filter to apply to the subscription.

A filter restricts the number of field updates that will be received. For example the filter (dLast >50) & (dVolumeAcc > 1000) means that the Liberator will only send updates to your application when the value of the field dLast is greater than 50 and the dVolumeAcc field is greater than 1000.

For more information on the filtering syntax, see the Caplin StreamLink 5.0 Overview.


Generated on Tue Apr 23 2024 11:14:03 for StreamLink for iOS