AdapterConnectionManager
Default implementation of IAdapterConnectionManager. Manages connection states for multiple adapters and aggregates basket state.
コンストラクター
AdapterConnectionManager(IAdapterConnectionState)
Default implementation of IAdapterConnectionManager. Manages connection states for multiple adapters and aggregates basket state.
- state
- State storage.
プロパティ
ConnectDisconnectEventOnFirstAdapter : bool
To call the ConnectMessage event when the first adapter connects. If , waits for all adapters to connect.
CurrentState : ConnectionStates
Gets the current aggregated connection state.
HasPendingAdapters : bool
Whether any adapter is still connecting.
State : IAdapterConnectionState
Gets the underlying state storage.
メソッド
BeginConnect()
Sets basket state to connecting.
BeginDisconnect()
Sets basket state to disconnecting.
InitializeAdapter(IMessageAdapter)
Initializes adapter state before connecting.
ProcessConnect(IMessageAdapter, Exception) : Message[]
Processes adapter connect response.
- adapter
- The adapter that connected.
- error
- Optional connection error.
戻り値: Messages to send to outer handler (Connect/Disconnect if basket state changed).
ProcessDisconnect(IMessageAdapter, Exception) : Message[]
Processes adapter disconnect response.
- adapter
- The adapter that disconnected.
- error
- Optional disconnection error.
戻り値: Messages to send to outer handler.
Reset()
Reset state.