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 #
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 #
Kuzzle sdk = new Kuzzle(new WebSocket("kuzzle"));
::: ::: tab Kotlin
Arguments #
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 #
val sdk: Kuzzle = Kuzzle(WebSocket("kuzzle"))
::: ::::
Edit this page on Github(opens new window)