AppSyncWsProtocol

class AppSyncWsProtocol(authorization: Map<String, Any?>, connectionAcknowledgeTimeoutMs: Long, webSocketConnection: WebSocketConnection, listener: WsProtocol.Listener) : WsProtocol

A WsProtocol for https://docs.aws.amazon.com/appsync/latest/devguide/real-time-websocket-client.html

Constructors

AppSyncWsProtocol
Link copied to clipboard
common
fun AppSyncWsProtocol(authorization: Map<String, Any?>, connectionAcknowledgeTimeoutMs: Long, webSocketConnection: WebSocketConnection, listener: WsProtocol.Listener)

Types

Companion
Link copied to clipboard
common
object Companion
Factory
Link copied to clipboard
common
class Factory(authorization: Map<String, Any?>, connectionAcknowledgeTimeoutMs: Long) : WsProtocol.Factory

Functions

connectionInit
Link copied to clipboard
common
open suspend override fun connectionInit()
Initializes the connection and suspends until the server acknowledges it.
handleServerMessage
Link copied to clipboard
common
open override fun handleServerMessage(messageMap: Map<String, Any?>)
Handles a server message and notifies listener appropriately
run
Link copied to clipboard
common
open fun run(scope: CoroutineScope)
startOperation
Link copied to clipboard
common
open override fun <D : Operation.Data> startOperation(request: ApolloRequest<D>)
Starts the given operation
stopOperation
Link copied to clipboard
common
open override fun <D : Operation.Data> stopOperation(request: ApolloRequest<D>)
Stops the given operation