SDK Java v2.x

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.

room #

Creates a new Room object, using its constructor.

room([options]) #

Arguments Type Description
options object Subscription configuration

Options #

Provided options are passed directly to the Room object constructor.

Return Value #

Returns the newly created Room object.

Usage #

Copied to clipboard!
JSONObject filters = new JSONObject()
    new JSONObject("field")
      .put(new JSONArray()
Room room = kuzzle.collection("collection", "index")
  .renew(filters, new ResponseListener<NotificationResponse>() {
      public void onSuccess(NotificationResponse object) {
        // handle notifications
      public void onError(JSONObject error) {
        // Handle notifications error