IBasketRoutingManager
Interface for managing message routing in basket adapter. Encapsulates all routing, connection, and subscription logic.
プロパティ
ConnectDisconnectEventOnFirstAdapter : bool
Gets or sets whether to fire connect/disconnect event on first adapter.
ConnectedCount : int
Gets the count of connected adapters.
HasPendingAdapters : bool
Gets whether there are adapters still connecting.
TransactionIdGenerator : IdGenerator
Transaction id generator used for internal child subscription routing. Must be kept in sync with the parent adapter's generator.
メソッド
AddOrderAdapter(long, IMessageAdapter)
Add order transaction to adapter mapping.
ApplyParentLookupId(ISubscriptionIdMessage) : bool
Apply parent lookup ID remapping to subscription message.
戻り値: if no valid parent found and message should be dropped.
BeginConnect()
Begin connection process.
BeginDisconnect()
Begin disconnection process.
GetAdaptersToDisconnect(Func<IMessageAdapter, IMessageAdapter>) : IDictionary<IMessageAdapter, IMessageAdapter>
Get adapters that need to be disconnected.
- adapterLookup
- Function to get wrapper from underlying adapter.
戻り値: Dictionary of wrapper to underlying adapter.
GetPortfolioAdapter(string, Func<IMessageAdapter, IMessageAdapter>) : IMessageAdapter
Get adapter for portfolio-based routing.
GetSubscribers(DataType) : long[]
Get subscriber IDs for a data type.
InitializeAdapter(IMessageAdapter)
Initialize adapter for connection.
LoadPortfolioAdapters(IEnumerable<ValueTuple<string, IMessageAdapter>>)
Clear and load portfolio adapter mappings.
LoadSecurityAdapters(IEnumerable<ValueTuple<ValueTuple<SecurityId, DataType>, IMessageAdapter>>)
Clear and load security adapter mappings.
OnAdapterRemoved(IMessageAdapter)
Called when an adapter is removed from the inner adapters list.
OnAdaptersCleared()
Called when all adapters are cleared from the inner adapters list.
OnPortfolioAdapterProviderChanged(string, Guid, bool, Func<Guid, IMessageAdapter>)
Handle portfolio adapter provider change.
OnSecurityAdapterProviderChanged(ValueTuple<SecurityId, DataType>, Guid, bool, Func<Guid, IMessageAdapter>)
Handle security adapter provider change.
ProcessBackMessage(IMessageAdapter, ISubscriptionMessage, Func<IMessageAdapter, IMessageAdapter>)
Process a back message with subscription tracking.
ProcessConnect(IMessageAdapter, IMessageAdapter, IEnumerable<MessageTypes>, Exception) : ValueTuple<IEnumerable<Message>, Message[], Message[]>
Process successful or failed connection.
- adapter
- The adapter that connected.
- wrapper
- The wrapper for the adapter.
- supportedMessages
- Supported message types.
- error
- Connection error if any.
戻り値: Extra messages to send out and pending messages to loop back.
ProcessDisconnect(IMessageAdapter, IMessageAdapter, IEnumerable<MessageTypes>, Exception) : IEnumerable<Message>
Process disconnection.
- adapter
- The adapter that disconnected.
- wrapper
- The wrapper for the adapter.
- supportedMessages
- Supported message types.
- error
- Disconnection error if any.
戻り値: Extra messages to send out.
ProcessInMessageAsync(Message, Func<IMessageAdapter, IMessageAdapter>, CancellationToken) : ValueTask<RoutingInResult>
Process an incoming message and determine routing decisions.
ProcessOutMessageAsync(IMessageAdapter, Message, Func<IMessageAdapter, IMessageAdapter>, CancellationToken) : ValueTask<RoutingOutResult>
Process an outgoing message from an inner adapter.
TryGetOrderAdapter(long, IMessageAdapter) : bool
Try get adapter for an order by its transaction ID.