Package io.ably.lib.rest

Class RestAnnotations

java.lang.Object
io.ably.lib.rest.RestAnnotations

public class RestAnnotations extends Object
The RestAnnotation class provides methods to manage and interact with annotations associated with messages in a specific channel.

Annotations can be retrieved, published, or deleted both synchronously and asynchronously. This class is intended as part of a client library for managing annotations via REST architecture.

Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

  • Constructor Details

  • Method Details

    • get

      public PaginatedResult<Annotation> get(String messageSerial, Param[] params) throws AblyException
      Retrieves a paginated list of annotations associated with the specified message serial.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      params - an array of query parameters for filtering or modifying the request.
      Returns:
      a PaginatedResult containing the matching annotations.
      Throws:
      AblyException - if an error occurs during the retrieval process.
    • get

      public PaginatedResult<Annotation> get(Message message, Param[] params) throws AblyException
      Throws:
      AblyException
      See Also:
    • getAsync

      public void getAsync(String messageSerial, Param[] params, Callback<AsyncPaginatedResult<Annotation>> callback) throws AblyException
      Asynchronously retrieves a paginated list of annotations associated with the specified message serial.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      params - an array of query parameters for filtering or modifying the request.
      callback - a callback to handle the result asynchronously, providing an AsyncPaginatedResult containing the matching annotations.
      Throws:
      AblyException
    • getAsync

      public void getAsync(Message message, Param[] params, Callback<AsyncPaginatedResult<Annotation>> callback) throws AblyException
      Throws:
      AblyException
      See Also:
    • get

      public PaginatedResult<Annotation> get(String messageSerial) throws AblyException
      Retrieves a paginated list of annotations associated with the specified message serial.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated
      Returns:
      a PaginatedResult containing the matching annotations
      Throws:
      AblyException - if an error occurs during the retrieval process
    • get

      public PaginatedResult<Annotation> get(Message message) throws AblyException
      Throws:
      AblyException
      See Also:
    • getAsync

      public void getAsync(String messageSerial, Callback<AsyncPaginatedResult<Annotation>> callback) throws AblyException
      Asynchronously retrieves a paginated list of annotations associated with the specified message serial.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      callback - a callback to handle the result asynchronously, providing an AsyncPaginatedResult containing the matching annotations.
      Throws:
      AblyException
    • getAsync

      public void getAsync(Message message, Callback<AsyncPaginatedResult<Annotation>> callback) throws AblyException
      Throws:
      AblyException
      See Also:
    • publish

      public void publish(String messageSerial, Annotation annotation) throws AblyException
      Publishes an annotation associated with the specified message serial to the REST channel.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      annotation - the annotation to be published.
      Throws:
      AblyException - if an error occurs during the publishing process.
    • publish

      public void publish(Message message, Annotation annotation) throws AblyException
      Throws:
      AblyException
      See Also:
    • publishAsync

      public void publishAsync(String messageSerial, Annotation annotation, Callback<Void> callback) throws AblyException
      Asynchronously publishes an annotation associated with the specified message serial to the REST channel.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      annotation - the annotation to be published.
      callback - a callback to handle the result asynchronously, providing a completion indication or error information.
      Throws:
      AblyException
    • publishAsync

      public void publishAsync(Message message, Annotation annotation, Callback<Void> callback) throws AblyException
      Throws:
      AblyException
      See Also:
    • delete

      public void delete(String messageSerial, Annotation annotation) throws AblyException
      Deletes an annotation associated with the specified message serial.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      annotation - the annotation to be deleted.
      Throws:
      AblyException - if an error occurs during the deletion process.
    • delete

      public void delete(Message message, Annotation annotation) throws AblyException
      Throws:
      AblyException
      See Also:
    • deleteAsync

      public void deleteAsync(String messageSerial, Annotation annotation, Callback<Void> callback) throws AblyException
      Asynchronously deletes an annotation associated with the specified message serial.

      Note: This is an experimental API. While the underlying functionality is stable, the public API may change in future releases.

      Parameters:
      messageSerial - the unique serial identifier for the message being annotated.
      annotation - the annotation to be deleted.
      callback - a callback to handle the result asynchronously, providing a completion indication or error information.
      Throws:
      AblyException
    • deleteAsync

      public void deleteAsync(Message message, Annotation annotation, Callback<Void> callback) throws AblyException
      Throws:
      AblyException
      See Also: