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.
Arguments #
public Kuzzle(
AbstractProtocol networkProtocol,
KuzzleOptions options
) throws IllegalArgumentException
Argument | Type | Description |
---|---|---|
networkProtocol | AbstractProtocol | Protocol used by the SDK instance |
options | KuzzleOptions | Class which contains options |
networkProtocol #
The protocol used to connect to the Kuzzle instance. It can be one of the following available protocols:
options #
The options used to connect to the Kuzzle instance. KuzzleOptions
Return #
The Kuzzle
SDK instance.
Throws #
Can throw an IllegalArgumentException
Usage #
KuzzleOptions options = new KuzzleOptions();
options.setMaxQueueSize(42)
.setMaxRequestDelay(1)
.setMinTokenDuration(24)
.setRefreshedTokenDuration(40)
.setQueueFilter(stringObjectConcurrentHashMap -> true);
Kuzzle kuzzle = new Kuzzle(new WebSocket("kuzzle"), options);
Edit this page on Github(opens new window)