/ fm / liveswitch / ConnectionStateLedger
Class: ConnectionStateLedger
fm.liveswitch.ConnectionStateLedger
Maintains a ledger of connection state transitions with timestamps. Tracks the history of state changes for a specific connection.
Table of contents
Constructors
Methods
Constructors
constructor
+ new ConnectionStateLedger(connectionId
: string): ConnectionStateLedger
Initializes a new instance of the ConnectionStateLedger class.
Parameters:
Name | Type | Description |
---|---|---|
connectionId |
string | The unique identifier for the connection to track. |
Returns: ConnectionStateLedger
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:16
Methods
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:10
recordConnectionState
▸ recordConnectionState(state
: ConnectionState): void
Records a new connection state transition with current timestamp.
Parameters:
Name | Type | Description |
---|---|---|
state |
ConnectionState | The new connection state to record. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:45
toString
▸ toString(): string
Provides a string representation of all recorded state transitions.
Returns: string
A formatted string showing all state transitions with timestamps and durations.
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:62