Class PathObjectSubscriptionOptions

java.lang.Object
io.ably.lib.liveobjects.path.PathObjectSubscriptionOptions

public final class PathObjectSubscriptionOptions extends Object
Optional subscription options accepted by PathObject.subscribe(PathObjectListener, PathObjectSubscriptionOptions).

Spec: RTPO19c

  • Constructor Details

    • PathObjectSubscriptionOptions

      public PathObjectSubscriptionOptions()
      Creates options with no depth set: there is no depth limit, and changes at any depth within nested children trigger the listener. Equivalent to passing a null depth.

      Spec: RTPO19c1

    • PathObjectSubscriptionOptions

      public PathObjectSubscriptionOptions(int depth) throws AblyException
      Creates options with the given depth. For infinite depth, use the no-arg constructor PathObjectSubscriptionOptions() instead.

      Spec: RTPO19c1, RTPO19c1a

      Parameters:
      depth - how many levels of path nesting below the subscribed path should trigger the listener; must be a positive integer
      Throws:
      AblyException - with statusCode 400 and code 40003 if depth is not a positive integer
  • Method Details

    • getDepth

      @Nullable public @Nullable Integer getDepth()
      Returns the configured nesting depth, or null if not set.

      Spec: RTPO19c1

      Returns:
      the depth value, or null