WebSocketExtensionFactory

interface WebSocketExtensionFactory<ConfigType : Any, ExtensionType : WebSocketExtension<ConfigType>>

Factory that defines WebSocket extension. The factory is used in pair with WebSocketExtensionsConfig.install method to install WebSocket extension in client or server.

Usually this interface implemented in companion object of the origin WebSocketExtension.

Properties

key

abstract val key: AttributeKey<ExtensionType>

Key is used to locate extension.

rsv1

abstract val rsv1: Boolean

First extension bit used by current extension.

rsv2

abstract val rsv2: Boolean

Second extension bit used by current extension.

rsv3

abstract val rsv3: Boolean

Third extension bit used by current extension.

Functions

install

abstract fun install(
    config: ConfigType.() -> Unit
): ExtensionType

Create extension instance using config block. The extension instance is created for each WebSocket request.

Inheritors

Companion

companion object Companion : 
    WebSocketExtensionFactory<Config, WebSocketDeflateExtension>