-
- All Implemented Interfaces:
-
app.perawallet.walletconnectv2.foundation.network.RelayInterface,app.perawallet.walletconnectv2.relay.RelayConnectionInterface
public final class RelayClient extends BaseRelayClient implements RelayConnectionInterface
-
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<Boolean>isNetworkAvailableprivate final StateFlow<WSSConnectionState>wssConnectionStateprivate RelayServicerelayServiceprivate BooleanisLoggingEnabledprivate final SharedFlow<Relay.Model.Event>eventsFlowprivate final Flow<Relay.Model.Call.Subscription.Request>subscriptionRequest
-
Constructor Summary
Constructors Constructor Description RelayClient(KoinApplication koinApp)
-
Method Summary
Modifier and Type Method Description StateFlow<Boolean>getIsNetworkAvailable()StateFlow<WSSConnectionState>getWssConnectionState()final RelayServicegetRelayService()final UnitsetRelayService(RelayService relayService)BooleangetIsLoggingEnabled()UnitsetIsLoggingEnabled(Boolean isLoggingEnabled)SharedFlow<Relay.Model.Event>getEventsFlow()Flow<Relay.Model.Call.Subscription.Request>getSubscriptionRequest()final Unitinitialize(ConnectionType connectionType, Function1<Throwable, Unit> onError)Unitconnect(Function1<Core.Model.Error, Unit> onError)Unitconnect(Function1<Core.Model.Error, Unit> onErrorModel, Function1<String, Unit> onError)Unitdisconnect(Function1<Core.Model.Error, Unit> onError)Unitdisconnect(Function1<Core.Model.Error, Unit> onErrorModel, Function1<String, Unit> onError)Unitrestart(Function1<Core.Model.Error, Unit> onError)-
-
Method Detail
-
getIsNetworkAvailable
StateFlow<Boolean> getIsNetworkAvailable()
-
getWssConnectionState
StateFlow<WSSConnectionState> getWssConnectionState()
-
getRelayService
final RelayService getRelayService()
-
setRelayService
final Unit setRelayService(RelayService relayService)
-
getIsLoggingEnabled
Boolean getIsLoggingEnabled()
-
setIsLoggingEnabled
Unit setIsLoggingEnabled(Boolean isLoggingEnabled)
-
getEventsFlow
SharedFlow<Relay.Model.Event> getEventsFlow()
-
getSubscriptionRequest
Flow<Relay.Model.Call.Subscription.Request> getSubscriptionRequest()
-
initialize
final Unit initialize(ConnectionType connectionType, Function1<Throwable, Unit> onError)
-
connect
Unit connect(Function1<Core.Model.Error, Unit> onError)
-
connect
Unit connect(Function1<Core.Model.Error, Unit> onErrorModel, Function1<String, Unit> onError)
-
disconnect
Unit disconnect(Function1<Core.Model.Error, Unit> onError)
-
disconnect
Unit disconnect(Function1<Core.Model.Error, Unit> onErrorModel, Function1<String, Unit> onError)
-
restart
Unit restart(Function1<Core.Model.Error, Unit> onError)
-
-
-
-