Class RestAnnotations
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 Summary
ConstructorsConstructorDescriptionRestAnnotations
(String channelName, Http http, ClientOptions clientOptions, ChannelOptions channelOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(Message message, Annotation annotation) void
delete
(String messageSerial, Annotation annotation) Deletes an annotation associated with the specified message serial.void
deleteAsync
(Message message, Annotation annotation, Callback<Void> callback) void
deleteAsync
(String messageSerial, Annotation annotation, Callback<Void> callback) Asynchronously deletes an annotation associated with the specified message serial.Retrieves a paginated list of annotations associated with the specified message serial.Retrieves a paginated list of annotations associated with the specified message serial.void
getAsync
(Message message, Callback<AsyncPaginatedResult<Annotation>> callback) void
getAsync
(Message message, Param[] params, Callback<AsyncPaginatedResult<Annotation>> callback) void
getAsync
(String messageSerial, Callback<AsyncPaginatedResult<Annotation>> callback) Asynchronously retrieves a paginated list of annotations associated with the specified message serial.void
getAsync
(String messageSerial, Param[] params, Callback<AsyncPaginatedResult<Annotation>> callback) Asynchronously retrieves a paginated list of annotations associated with the specified message serial.void
publish
(Message message, Annotation annotation) void
publish
(String messageSerial, Annotation annotation) Publishes an annotation associated with the specified message serial to the REST channel.void
publishAsync
(Message message, Annotation annotation, Callback<Void> callback) void
publishAsync
(String messageSerial, Annotation annotation, Callback<Void> callback) Asynchronously publishes an annotation associated with the specified message serial to the REST channel.
-
Constructor Details
-
RestAnnotations
public RestAnnotations(String channelName, Http http, ClientOptions clientOptions, ChannelOptions channelOptions)
-
-
Method Details
-
get
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
- 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 anAsyncPaginatedResult
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
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
- 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 anAsyncPaginatedResult
containing the matching annotations. - Throws:
AblyException
-
getAsync
public void getAsync(Message message, Callback<AsyncPaginatedResult<Annotation>> callback) throws AblyException - Throws:
AblyException
- See Also:
-
publish
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
- 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
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
- 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:
-