SDK
SDK Jvm v1.x
2

Constructor #

Use this constructor to create a new instance of the SDK. Each instance represents a different connection to a Kuzzle server with specific options.

:::: tabs ::: tab Java

Arguments #

Copied to clipboard!
public Kuzzle(
  AbstractProtocol networkProtocol,
  bool subscribeToSelf
) throws IllegalArgumentException

public Kuzzle(
  AbstractProtocol networkProtocol
) throws IllegalArgumentException

Argument Type Description
networkProtocol
AbstractProtocol
Protocol used by the SDK instance
autoResubscribe
boolean

(true)
Class which contains options

networkProtocol #

The protocol used to connect to the Kuzzle instance. It can be one of the following available protocols:

Return #

The Kuzzle SDK instance.

Throws #

Can throw an IllegalArgumentException

Usage #

Copied to clipboard!
Kuzzle sdk = new Kuzzle(new WebSocket("kuzzle"));

::: ::: tab Kotlin

Arguments #

Copied to clipboard!
fun Kuzzle(protocol: AbstractProtocol, autoResubscribe: Boolean = true)

Argument Type Description
networkProtocol
AbstractProtocol
Protocol used by the SDK instance
autoResubscribe
Boolean

(true)
Class which contains options

networkProtocol #

The protocol used to connect to the Kuzzle instance. It can be one of the following available protocols:

  • WebSocket

Return #

The Kuzzle SDK instance.

Usage #

Copied to clipboard!
val sdk: Kuzzle = Kuzzle(WebSocket("kuzzle"))

::: ::::