dxFeed .Net API  5.13.0
dxFeed .Net API library intended to provide market data access for DX clients
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
com.dxfeed.native.OrderViewSubscription Class Reference

More...

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

Public Member Functions

 OrderViewSubscription (NativeConnection connection, IDxOrderViewListener listener)
 Constructor More...
 
void AddSymbol (string symbol)
 Add symbol to subscription. More...
 
void AddSymbol (CandleSymbol symbol)
 This method is not allowed. Throws exception. More...
 
void AddSymbols (params string[] symbols)
 Add multiply symbols to subscription. More...
 
void AddSymbols (params CandleSymbol[] symbols)
 This method is not allowed. Throws exception. More...
 
void RemoveSymbols (params string[] symbols)
 Remove multiply symbols from subscription. More...
 
void RemoveSymbols (params CandleSymbol[] symbols)
 This method is not allowed. Throws exception. More...
 
void SetSymbols (params string[] symbols)
 Set multiply symbols to subscription. More...
 
void SetSymbols (params CandleSymbol[] symbols)
 Inherited from IDxSubscription This method is not allowed. Throws exception. More...
 
void Clear ()
 Clear all symbols from subscription. More...
 
IList< string > GetSymbols ()
 Get all symbols from subscription. More...
 
void AddSource (params string[] sources)
 Add events.OrderSource to subscription. More...
 
void SetSource (params string[] sources)
 Remove existing events.OrderSource from subscription and set new. More...
 
void Dispose ()
 This code added to correctly implement the disposable pattern. More...
 
void OnOrder< TB, TE > (TB buf)
 On Order event received. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 This code added to correctly implement the disposable pattern. More...
 

Private Types

enum  SnapshotState { SnapshotState.Unbroken, SnapshotState.Broken }
 used for snapshotsStates More...
 
enum  OrderViewState : int { OrderViewState.Update = 0x01, OrderViewState.Ready = 0x02, OrderViewState.Pending = 0x04 }
 States of the order view subscription: More...
 

Private Member Functions

void RemoveSymbolSourcePair (string symbolSource)
 
void SnapshotEndFlagReceived< TB, TE > (TB buf)
 

Static Private Member Functions

static string CreateCompoundKey (ulong snapshotKey, string symbol, IndexedEventSource source)
 
static IDxOrder ZeroOrder (IDxOrder order)
 
static bool IsZeroOrder (IDxOrder order)
 

Private Attributes

readonly IDxOrderViewListener listener
 
NativeConnection connection
 
IDxSubscription subscription
 
readonly IDictionary< string, OrderEventBuffersnapshots = new Dictionary<string, OrderEventBuffer>()
 All snapshots, access by unique key (string) A key is a string which consists of snapshot key of received snapshot, symbol and source More...
 
readonly IDictionary< string, SnapshotStatesnapshotsStates = new Dictionary<string, SnapshotState>()
 used when snapshot ends with flags EventFlag.TxPending combined with EventFlag.SnapshotEnd or EventFlag.SnapshotSnip More...
 
readonly IDictionary< string, IList< string > > symbolSourceToKey = new Dictionary<string, IList<string>>()
 Map between Symbol + Source string and unique snapshot key in snapshots dictionary More...
 
readonly ISet< IndexedEventSourcesources = new HashSet<IndexedEventSource>()
 
readonly ISet< string > symbols = new HashSet<string>()
 
readonly IDictionary< string, ISet< IndexedEventSource > > receivedSnapshots
 All received snapshots, empty set means no received snapshots yet. Key - means symbol, value - set of received snapshots sources. More...
 
readonly IDictionary< string, OrderViewStateorderViewStates = new Dictionary<string, OrderViewState>()
 The dictionary os states for each order view in the format: More...
 
const string AddSymbolBeforeSourceErrorText
 
const string AddCandleSymbolErrorText = "Candle symbols is not allowed for OrderViewSubscription."
 
bool disposedValue = false
 

Detailed Description

Client will be notified about first combined snapshot from different sources, and, after that, about separate orders

Member Enumeration Documentation

◆ OrderViewState

States of the order view subscription:

Update - when snapshot begins for one of the source in order view

Ready - when snapshot ends for all sources in order view

Pending - when updating and received EventFlag.TxPending - begin collecting events

Enumerator
Update 
Ready 
Pending 

◆ SnapshotState

used for snapshotsStates

Enumerator
Unbroken 
Broken 

Constructor & Destructor Documentation

◆ OrderViewSubscription()

com.dxfeed.native.OrderViewSubscription.OrderViewSubscription ( NativeConnection  connection,
IDxOrderViewListener  listener 
)
inline

Constructor

Parameters
connectionIDxConnection connection
listenerOrderView listener

Member Function Documentation

◆ AddSource()

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

Add events.OrderSource to subscription.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbol() [1/2]

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

Add symbol to subscription.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbol() [2/2]

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

This method is not allowed. Throws exception.

Add candle symbol to subscription.

Exceptions
T:System.InvalidOperationExceptionCandle symbols is not allowed for T:com.dxfeed.native.OrderViewSubscription

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbols() [1/2]

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

Add multiply symbols to subscription.

Implements com.dxfeed.api.IDxSubscription.

◆ AddSymbols() [2/2]

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

This method is not allowed. Throws exception.

Add multiply candle symbols to subscription.

Exceptions
T:System.InvalidOperationExceptionCandle symbols is not allowed for T:com.dxfeed.native.OrderViewSubscription

Implements com.dxfeed.api.IDxSubscription.

◆ Clear()

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

Clear all symbols from subscription.

Exceptions
DxException

Implements com.dxfeed.api.IDxSubscription.

◆ CreateCompoundKey()

static string com.dxfeed.native.OrderViewSubscription.CreateCompoundKey ( ulong  snapshotKey,
string  symbol,
IndexedEventSource  source 
)
inlinestaticprivate

◆ Dispose() [1/2]

virtual void com.dxfeed.native.OrderViewSubscription.Dispose ( bool  disposing)
inlineprotectedvirtual

This code added to correctly implement the disposable pattern.

◆ Dispose() [2/2]

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

This code added to correctly implement the disposable pattern.

◆ GetSymbols()

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

Get all symbols from subscription.

Implements com.dxfeed.api.IDxSubscription.

◆ IsZeroOrder()

static bool com.dxfeed.native.OrderViewSubscription.IsZeroOrder ( IDxOrder  order)
inlinestaticprivate

◆ OnOrder< TB, TE >()

void com.dxfeed.native.OrderViewSubscription.OnOrder< TB, TE > ( TB  buf)
inline

On Order event received.

Template Parameters
TBEvent buffer type.
TEEvent type.
Parameters
bufEvent buffer object.

Implements com.dxfeed.api.IDxOrderListener.

Type Constraints
TB :IDxEventBuf<TE> 
TE :IDxOrder 

◆ RemoveSymbols() [1/2]

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

Remove multiply symbols from subscription.

Implements com.dxfeed.api.IDxSubscription.

◆ RemoveSymbols() [2/2]

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

This method is not allowed. Throws exception.

Remove multiply symbols from subscription.

Exceptions
T:System.InvalidOperationExceptionCandle symbols is not allowed for T:com.dxfeed.native.OrderViewSubscription

Implements com.dxfeed.api.IDxSubscription.

◆ RemoveSymbolSourcePair()

void com.dxfeed.native.OrderViewSubscription.RemoveSymbolSourcePair ( string  symbolSource)
inlineprivate

◆ SetSource()

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

Remove existing events.OrderSource from subscription and set new.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSymbols() [1/2]

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

Set multiply symbols to subscription.

Implements com.dxfeed.api.IDxSubscription.

◆ SetSymbols() [2/2]

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

Inherited from IDxSubscription This method is not allowed. Throws exception.

Parameters
symbolslist of symbols
Exceptions
InvalidOperationExceptionCandle symbols is not allowed for OrderViewSubscription

Implements com.dxfeed.api.IDxSubscription.

◆ SnapshotEndFlagReceived< TB, TE >()

void com.dxfeed.native.OrderViewSubscription.SnapshotEndFlagReceived< TB, TE > ( TB  buf)
inlineprivate
Type Constraints
TB :IDxEventBuf<TE> 
TE :IDxOrder 

◆ ZeroOrder()

static IDxOrder com.dxfeed.native.OrderViewSubscription.ZeroOrder ( IDxOrder  order)
inlinestaticprivate

Field Documentation

◆ AddCandleSymbolErrorText

const string com.dxfeed.native.OrderViewSubscription.AddCandleSymbolErrorText = "Candle symbols is not allowed for OrderViewSubscription."
private

◆ AddSymbolBeforeSourceErrorText

const string com.dxfeed.native.OrderViewSubscription.AddSymbolBeforeSourceErrorText
private
Initial value:
= @"You must configure subscription
with AddSource or SetSource before calling this method."

◆ connection

NativeConnection com.dxfeed.native.OrderViewSubscription.connection
private

◆ disposedValue

bool com.dxfeed.native.OrderViewSubscription.disposedValue = false
private

◆ listener

readonly IDxOrderViewListener com.dxfeed.native.OrderViewSubscription.listener
private

◆ orderViewStates

readonly IDictionary<string, OrderViewState> com.dxfeed.native.OrderViewSubscription.orderViewStates = new Dictionary<string, OrderViewState>()
private

The dictionary os states for each order view in the format:

map[symbol-of-order-view] = state

◆ receivedSnapshots

readonly IDictionary<string, ISet<IndexedEventSource> > com.dxfeed.native.OrderViewSubscription.receivedSnapshots
private
Initial value:
=
new Dictionary<string, ISet<IndexedEventSource>>()

All received snapshots, empty set means no received snapshots yet. Key - means symbol, value - set of received snapshots sources.

◆ snapshots

readonly IDictionary<string, OrderEventBuffer> com.dxfeed.native.OrderViewSubscription.snapshots = new Dictionary<string, OrderEventBuffer>()
private

All snapshots, access by unique key (string) A key is a string which consists of snapshot key of received snapshot, symbol and source

◆ snapshotsStates

readonly IDictionary<string, SnapshotState> com.dxfeed.native.OrderViewSubscription.snapshotsStates = new Dictionary<string, SnapshotState>()
private

used when snapshot ends with flags EventFlag.TxPending combined with EventFlag.SnapshotEnd or EventFlag.SnapshotSnip

◆ sources

readonly ISet<IndexedEventSource> com.dxfeed.native.OrderViewSubscription.sources = new HashSet<IndexedEventSource>()
private

◆ subscription

IDxSubscription com.dxfeed.native.OrderViewSubscription.subscription
private

◆ symbols

readonly ISet<string> com.dxfeed.native.OrderViewSubscription.symbols = new HashSet<string>()
private

◆ symbolSourceToKey

readonly IDictionary<string, IList<string> > com.dxfeed.native.OrderViewSubscription.symbolSourceToKey = new Dictionary<string, IList<string>>()
private

Map between Symbol + Source string and unique snapshot key in snapshots dictionary


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