fm.liveswitch.ConnectionStateLedger Class Reference

Maintains a ledger of connection state transitions with timestamps. More...

Public Member Functions

 ConnectionStateLedger (String connectionId, boolean client, String connectionType, String clientId, fm.liveswitch.MediaProtocol mediaProtocol)
 Initializes a new instance of the ConnectionStateLedger class. More...
 
void recordActiveCandidatePairSet ()
 Records setting active candidate pair. More...
 
void recordActiveCandidatePairUnset ()
 Records removal of active candidate pair. More...
 
void recordAnswer (fm.liveswitch.ConnectionState state, boolean sent, boolean renegotiation)
 Records an offer. More...
 
void recordConnectionState (fm.liveswitch.ConnectionState state)
 Records a new connection state transition with current timestamp. More...
 
void recordDtlsConnected ()
 Records the event indicating that DTLS transport is Connected. More...
 
void recordDtlsConnecting ()
 Records the event indicating that DTLS transport is Connecting. More...
 
void recordError (fm.liveswitch.ConnectionState state, String error)
 Records an error. More...
 
void recordLocalCertificate (String certificate64, String asn164)
 Records local DTLS certificate. More...
 
void recordMediaIntent (fm.liveswitch.ConnectionState state, boolean sent)
 Records a media intent with current timestamp. More...
 
void recordOffer (fm.liveswitch.ConnectionState state, boolean sent, boolean renegotiation)
 Records an offer. More...
 
void recordPeerReflexiveRemoteCandidateDiscovered ()
 Records a discovered peer reflexive remote candidate. More...
 
void recordProcessedRemoteCandidate (fm.liveswitch.ConnectionState state)
 Records a signaled remote candidate. More...
 
void recordReceivedIceApplicationData (String data)
 Records information about ICE application data received during connection establishment. More...
 
void recordSignaledRemoteCandidate (fm.liveswitch.ConnectionState state)
 Records a signaled remote candidate. More...
 
String toString ()
 Provides a string representation of all recorded state transitions. More...
 

Detailed Description

Maintains a ledger of connection state transitions with timestamps.

Tracks the history of state changes for a specific connection.

Constructor & Destructor Documentation

◆ ConnectionStateLedger()

fm.liveswitch.ConnectionStateLedger.ConnectionStateLedger ( String  connectionId,
boolean  client,
String  connectionType,
String  clientId,
fm.liveswitch.MediaProtocol  mediaProtocol 
)

Initializes a new instance of the ConnectionStateLedger class.

Parameters
connectionIdThe unique identifier for the connection to track.
clientIndicates whether this ledger is for the client rather than for a server.
connectionTypeIndicates the connection type.
clientIdThe unique identifier for the client.
mediaProtocolThe media protocol of this connection.

Member Function Documentation

◆ recordActiveCandidatePairSet()

void fm.liveswitch.ConnectionStateLedger.recordActiveCandidatePairSet ( )

Records setting active candidate pair.

◆ recordActiveCandidatePairUnset()

void fm.liveswitch.ConnectionStateLedger.recordActiveCandidatePairUnset ( )

Records removal of active candidate pair.

◆ recordAnswer()

void fm.liveswitch.ConnectionStateLedger.recordAnswer ( fm.liveswitch.ConnectionState  state,
boolean  sent,
boolean  renegotiation 
)

Records an offer.

◆ recordConnectionState()

void fm.liveswitch.ConnectionStateLedger.recordConnectionState ( fm.liveswitch.ConnectionState  state)

Records a new connection state transition with current timestamp.

Parameters
stateThe new connection state to record.

◆ recordDtlsConnected()

void fm.liveswitch.ConnectionStateLedger.recordDtlsConnected ( )

Records the event indicating that DTLS transport is Connected.

◆ recordDtlsConnecting()

void fm.liveswitch.ConnectionStateLedger.recordDtlsConnecting ( )

Records the event indicating that DTLS transport is Connecting.

◆ recordError()

void fm.liveswitch.ConnectionStateLedger.recordError ( fm.liveswitch.ConnectionState  state,
String  error 
)

Records an error.

◆ recordLocalCertificate()

void fm.liveswitch.ConnectionStateLedger.recordLocalCertificate ( String  certificate64,
String  asn164 
)

Records local DTLS certificate.

Parameters
certificate64Hexadecimal representation of the certificate.
asn164Hexadecimal representation of the ASN.1 of the certificate.

◆ recordMediaIntent()

void fm.liveswitch.ConnectionStateLedger.recordMediaIntent ( fm.liveswitch.ConnectionState  state,
boolean  sent 
)

Records a media intent with current timestamp.

◆ recordOffer()

void fm.liveswitch.ConnectionStateLedger.recordOffer ( fm.liveswitch.ConnectionState  state,
boolean  sent,
boolean  renegotiation 
)

Records an offer.

◆ recordPeerReflexiveRemoteCandidateDiscovered()

void fm.liveswitch.ConnectionStateLedger.recordPeerReflexiveRemoteCandidateDiscovered ( )

Records a discovered peer reflexive remote candidate.

◆ recordProcessedRemoteCandidate()

void fm.liveswitch.ConnectionStateLedger.recordProcessedRemoteCandidate ( fm.liveswitch.ConnectionState  state)

Records a signaled remote candidate.

◆ recordReceivedIceApplicationData()

void fm.liveswitch.ConnectionStateLedger.recordReceivedIceApplicationData ( String  data)

Records information about ICE application data received during connection establishment.

This diagnostic information helps troubleshoot connectivity issues by showing what types of data were received from remote peers.

Parameters
dataA summary string of the received application data

◆ recordSignaledRemoteCandidate()

void fm.liveswitch.ConnectionStateLedger.recordSignaledRemoteCandidate ( fm.liveswitch.ConnectionState  state)

Records a signaled remote candidate.

◆ toString()

String fm.liveswitch.ConnectionStateLedger.toString ( )

Provides a string representation of all recorded state transitions.

Returns
A formatted string showing all state transitions with timestamps and durations.