MetricsConnection class

Constructors

MetricsConnection({String restEndpoint = defaultRestEndpoint, String socketEndpoint = defaultSocketEndpoint, bool shouldEnableWebSocket = defaultShouldEnableWebSocket, Duration socketTimeout = defaultSocketTimeout, int concurrentRequestLimit = defaultConcurrentRequestLimit, int requestRetryLimit = defaultRequestRetryLimit, bool shouldEnableErrorLogging = false, int? socketRetryTimeout})
Creates a new instance of MetricsConnection.

Properties

concurrentRequestLimit int
final
decodedAccesstoken JWTToken?
no setter
hashCode int
The hash code for this object.
no setterinherited
isSocketConnected bool
no setter
onAuthenticationStatusChange Stream<AuthenticationState>
no setter
onChatRoomMessage Stream<ChatRoomMessage>
no setter
onConnectionStatusChange Stream<ConnectionState>
no setter
onError Stream<MetricsApiError>
no setter
onRefreshTokenChange Stream<RefreshTokenChangeEvent>
no setter
onServerStatusChange Stream<ServerState>
no setter
requestRetryLimit int
final
restEndpoint String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverStatus ServerState
no setter
shouldEnableErrorLogging bool
final
shouldEnableWebSocket bool
final
socketEndpoint String
final
socketRetryTimeout int?
final
socketTimeout Duration
final

Methods

action({required String path, required String action, required String method, Map<String, dynamic> queryParameters = const {}, Map<String, dynamic> socketParameters = const {}, Map<String, dynamic>? bodyParameters}) Future<ResponseMessage>
This method makes a request to a desired route.
close() → void
Closes the websocket and rest connections.
dispose() Future<void>
Closes and disposes everything within the connection class.
initializeAuthenticatedSession({required String token}) Future<void>
Creates an authenticated session. This method must be called before making any requests to authenticated routes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open() → void
Opens the websocket and REST connections.
sendChatRoomMessage({required String room, required Map<String, dynamic> params}) Future<ResponseMessage>
Send a websocket message directly to a server chatroom
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited