Class DittoTransportSnapshot
Represents a snapshot of a specific transport's current state.
This class captures the connection type and peer connection states for a single transport at a specific point in time. Peers are categorized by their connection state: connecting, connected, disconnecting, or disconnected.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanlong @NonNull []Returns the site IDs of peers that are currently connected.long @NonNull []Returns the site IDs of peers that are currently establishing a connection.@NonNull StringReturns the type of this transport connection.long @NonNull []Returns the site IDs of peers that were previously connected but are now disconnected.long @NonNull []Returns the site IDs of peers that are currently disconnecting.inthashCode()
-
Method Details
-
getConnectionType
Returns the type of this transport connection.- Returns:
- a string identifying the connection type (e.g., "Bluetooth", "TCP", "WebSocket").
-
getConnecting
public long @NonNull [] getConnecting()Returns the site IDs of peers that are currently establishing a connection.
These are peers in the process of connecting but not yet fully connected.
- Returns:
- an array of site IDs for connecting peers.
-
getConnected
public long @NonNull [] getConnected()Returns the site IDs of peers that are currently connected.
These peers have fully established connections and can exchange data.
- Returns:
- an array of site IDs for connected peers.
-
getDisconnecting
public long @NonNull [] getDisconnecting()Returns the site IDs of peers that are currently disconnecting.
These are peers in the process of terminating their connection.
- Returns:
- an array of site IDs for disconnecting peers.
-
getDisconnected
public long @NonNull [] getDisconnected()Returns the site IDs of peers that were previously connected but are now disconnected.
These peers are no longer reachable through this transport.
- Returns:
- an array of site IDs for disconnected peers.
-
hashCode
-
equals
-