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.
Edit this page on Github (opens new window)
Use this constructor to create a new instance of the SDK. Each instance represents a different connection to a Kuzzle server with specific options.
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 |
The protocol used to connect to the Kuzzle instance. It can be one of the following available protocols:
The Kuzzle
SDK instance.
Can throw an IllegalArgumentException
Kuzzle sdk = new Kuzzle(new WebSocket("kuzzle"));
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 |
The protocol used to connect to the Kuzzle instance. It can be one of the following available protocols:
The Kuzzle
SDK instance.
val sdk: Kuzzle = Kuzzle(WebSocket("kuzzle"))