SDK
SDK Java v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

This SDK has been deprecated because of stability issues. It is not advised to use it in a production environment.

Notifications #

The Realtime.subscribe method takes a io.kuzzle.sdk.NotificationListener event listener (implements the EventListener interface). That listener is fed with a io.kuzzle.sdk.NotificationResult object, whose content depends on the type of notification.

Properties can be accessed with usual getters and setters.

Document & messages #

These io.kuzzle.sdk.NotificationResult represent documents changes & messages.

PropertyTypeDescription
actionStringAPI controller's action
collectionStringData collection
controllerStringAPI controller
indexStringData index
protocolStringNetwork protocol used to modify the document
resultio.kuzzle.sdk.NotificationContentNotification content
roomIdStringSubscription channel identifier. Can be used to link a notification to its corresponding subscription
scopeStringin: document enters (or stays) in the scope
out: document leaves the scope
timestampBigIntegerTimestamp of the event, in Epoch-millis format
nTypeStringdocument: the notification type
volatileStringJSON String representing request volatile data

The io.kuzzle.sdk.NotificationContent object has the following properties for document notifications & messages:

PropertyTypeDescription
idStringDocument unique ID
null if the notification is from a real-time message
contentStringA JSON String message or full document content. Not present if the event is about a document deletion

User #

These io.kuzzle.sdk.NotificationResult represent user events.

PropertyTypeDescription
actionStringAPI controller's action
collectionStringData collection
controllerStringAPI controller
indexStringData index
protocolStringNetwork protocol used by the entering/leaving user
resultio.kuzzle.sdk.NotificationContentNotification content
roomIdStringSubscription channel identifier. Can be used to link a notification to its corresponding subscription
timestampNumberTimestamp of the event, in Epoch-millis format
nTypeBigIntegeruser: the notification type
userStringin: a new user has subscribed to the same filters
out: a user cancelled a shared subscription
volatileStringJSON String representing request volatile data

The io.kuzzle.sdk.NotificationContent object has the following properties for user events:

PropertyTypeDescription
countintUpdated users count sharing that same subscription