dxFeed .Net API  7.1.0
dxFeed .Net API library intended to provide market data access for DX clients
com.dxfeed.native.NativeSubscription Class Reference

Class provides native event subscription More...

Inheritance diagram for com.dxfeed.native.NativeSubscription:
[legend]
Collaboration diagram for com.dxfeed.native.NativeSubscription:
[legend]

Public Member Functions

 NativeSubscription (NativeConnection connection, EventType eventType, EventSubscriptionFlag eventSubscriptionFlags, IDxEventListener listener)
 Creates the new event subscription. More...
 
 NativeSubscription (NativeConnection connection, EventType eventType, IDxEventListener listener)
 Creates the new event subscription. More...
 
 NativeSubscription (NativeConnection connection, EventType eventType, long time, EventSubscriptionFlag eventSubscriptionFlags, IDxEventListener listener)
 Creates the new time event subscription. More...
 
 NativeSubscription (NativeConnection connection, EventType eventType, long time, IDxEventListener listener)
 Creates the new time event subscription. More...
 
 NativeSubscription (NativeConnection connection, EventType eventType, DateTime time, EventSubscriptionFlag eventSubscriptionFlags, IDxEventListener listener)
 Creates the new time event subscription. More...
 
 NativeSubscription (NativeConnection connection, EventType eventType, DateTime time, IDxEventListener listener)
 Creates the new time event subscription. More...
 
 NativeSubscription (NativeConnection connection, DateTime? time, EventSubscriptionFlag eventSubscriptionFlags, IDxCandleListener listener)
 Creates the new Candle event subscription. For rest events use another constructor. More...
 
 NativeSubscription (NativeConnection connection, DateTime? time, IDxCandleListener listener)
 Creates the new Candle event subscription. For rest events use another constructor. More...
 
void Dispose ()
 Disposes the subscription More...
 
void AddSymbol (string symbol)
 
void AddSymbol (CandleSymbol symbol)
 Adds a candle symbol to the subscription. More...
 
void AddSymbols (params string[] symbols)
 
void AddSymbols (params CandleSymbol[] symbols)
 Adds candle symbols to the subscription. More...
 
void RemoveSymbols (params string[] symbols)
 
void RemoveSymbols (params CandleSymbol[] symbols)
 
void SetSymbols (params string[] symbols)
 Sets symbols of the subscription. More...
 
void SetSymbols (params CandleSymbol[] symbols)
 Sets symbols of the subscription. More...
 
void Clear ()
 
unsafe IList< string > GetSymbols ()
 Returns all symbols of the subscription. More...
 
void AddSource (params string[] sources)
 Adds a OrderSource to the subscription. More...
 
void SetSource (params string[] sources)
 Removes the existing OrderSource from the subscription and sets the new one. More...
 

Detailed Description

Class provides native event subscription

Constructor & Destructor Documentation

◆ NativeSubscription() [1/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
EventType  eventType,
EventSubscriptionFlag  eventSubscriptionFlags,
IDxEventListener  listener 
)
inline

Creates the new event subscription.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionnative connection pointer
eventTypetype of event to create
eventSubscriptionFlagsevent subscription flags
listenerevent listener
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [2/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
EventType  eventType,
IDxEventListener  listener 
)
inline

Creates the new event subscription.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionnative connection pointer
eventTypetype of event to create
listenerevent listener
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [3/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
EventType  eventType,
long  time,
EventSubscriptionFlag  eventSubscriptionFlags,
IDxEventListener  listener 
)
inline

Creates the new time event subscription.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionNative connection pointer.
eventTypeType of event to create.
timeUnix time stamp (the number of milliseconds from 1.1.1970)
eventSubscriptionFlagsevent subscription flags
listenerEvent listener.
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [4/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
EventType  eventType,
long  time,
IDxEventListener  listener 
)
inline

Creates the new time event subscription.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionNative connection pointer.
eventTypeType of event to create.
timeUnix time stamp (the number of milliseconds from 1.1.1970)
listenerEvent listener.
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [5/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
EventType  eventType,
DateTime  time,
EventSubscriptionFlag  eventSubscriptionFlags,
IDxEventListener  listener 
)
inline

Creates the new time event subscription.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionNative connection pointer.
eventTypeType of event to create.
timeTime to getting events from.
eventSubscriptionFlagsevent subscription flags
listenerEvent listener.
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [6/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
EventType  eventType,
DateTime  time,
IDxEventListener  listener 
)
inline

Creates the new time event subscription.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionNative connection pointer.
eventTypeType of event to create.
timeTime to getting events from.
listenerEvent listener.
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [7/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
DateTime?  time,
EventSubscriptionFlag  eventSubscriptionFlags,
IDxCandleListener  listener 
)
inline

Creates the new Candle event subscription. For rest events use another constructor.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionNative connection pointer.
timeDate time in the past.
eventSubscriptionFlagsevent subscription flags
listenerCandle event listener.
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

◆ NativeSubscription() [8/8]

com.dxfeed.native.NativeSubscription.NativeSubscription ( NativeConnection  connection,
DateTime?  time,
IDxCandleListener  listener 
)
inline

Creates the new Candle event subscription. For rest events use another constructor.

Don't call this constructor inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
connectionNative connection pointer.
timeDate time in the past.
listenerCandle event listener.
Exceptions
ArgumentExceptionOne of passed parameters is not valid.
DxException

Member Function Documentation

◆ AddSource()

void com.dxfeed.native.NativeSubscription.AddSource ( params string []  sources)
inline

Adds a OrderSource to the subscription.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
sourcesList of OrderSource names.
Exceptions
ArgumentExceptionInvalid sources parameter.
InvalidOperationExceptionYou try to add more than one source to subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbol() [1/2]

void com.dxfeed.native.NativeSubscription.AddSymbol ( string  symbol)
inline

Adds a symbol to the subscription.

A wildcard symbol "*" will replace all symbols: there will be an unsubscription from messages on all current symbols and a subscription to "*". The subscription type will be changed to STREAM If there is already a subscription to "*", then nothing will happen

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolSymbol.
Exceptions
ArgumentExceptionInvalid symbol parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbol() [2/2]

void com.dxfeed.native.NativeSubscription.AddSymbol ( CandleSymbol  symbol)
inline

Adds a candle symbol to the subscription.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolCandleSymbol.
Exceptions
ArgumentExceptionInvalid symbol parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbols() [1/2]

void com.dxfeed.native.NativeSubscription.AddSymbols ( params string []  symbols)
inline

Adds symbols to the subscription.

First met the "*" symbol (wildcard) will overwrite all other symbols: there will be an unsubscription from messages on all current symbols and a subscription to "*". The subscription type will be changed to STREAM If there is already a subscription to "*", then nothing will happen.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolsList of symbols.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbols() [2/2]

void com.dxfeed.native.NativeSubscription.AddSymbols ( params CandleSymbol []  symbols)
inline

Adds candle symbols to the subscription.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolsList of CandleSymbol.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ Clear()

void com.dxfeed.native.NativeSubscription.Clear ( )
inline

Removes all symbols from the subscription.

Snapshot will be IDisposable.Dispose().

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Exceptions
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ Dispose()

void com.dxfeed.native.NativeSubscription.Dispose ( )
inline

Disposes the subscription

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

◆ GetSymbols()

unsafe IList<string> com.dxfeed.native.NativeSubscription.GetSymbols ( )
inline

Returns all symbols of the subscription.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Returns
List of subscribed symbols.
Exceptions
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ RemoveSymbols() [1/2]

void com.dxfeed.native.NativeSubscription.RemoveSymbols ( params string []  symbols)
inline

Removes symbols from the subscription.

First met the "*" symbol (wildcard) will remove all symbols: there will be an unsubscription from messages on all current symbols. If there is already a subscription to "*" and the symbols to remove are not contain a "*", then nothing will happen.

Snapshot will be disposed if symbols contains snapshot symbol (for Snapshots only).

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolsList of symbols.
Exceptions
ArgumentExceptionInvalid symbols parameter.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ RemoveSymbols() [2/2]

void com.dxfeed.native.NativeSubscription.RemoveSymbols ( params CandleSymbol []  symbols)
inline

Removes symbols from the subscription.

Snapshot will be disposed if symbols contains snapshot symbol (for Snapshots only).

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolsList of CandleSymbol.
Exceptions
ArgumentExceptionInvalid symbols parameter.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSource()

void com.dxfeed.native.NativeSubscription.SetSource ( params string []  sources)
inline

Removes the existing OrderSource from the subscription and sets the new one.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
sourcesList of OrderSource names.
Exceptions
ArgumentExceptionInvalid sources parameter.
InvalidOperationExceptionYou try to add more than one source to subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSymbols() [1/2]

void com.dxfeed.native.NativeSubscription.SetSymbols ( params string []  symbols)
inline

Sets symbols of the subscription.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolsList of symbols.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSymbols() [2/2]

void com.dxfeed.native.NativeSubscription.SetSymbols ( params CandleSymbol []  symbols)
inline

Sets symbols of the subscription.

Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, NativeRegionalBook, NativeSnapshotSubscription classes

Parameters
symbolsList of CandleSymbol.
Exceptions
ArgumentExceptionInvalid symbols parameter.
InvalidOperationExceptionYou try to add more than one symbol to snapshot subscription.
DxExceptionInternal error.

Implements com.dxfeed.api.IDxSubscription.


The documentation for this class was generated from the following file: