-
public class RestAnnotationsThe 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 Summary
Constructors Constructor Description RestAnnotations(String channelName, Http http, ClientOptions clientOptions, ChannelOptions channelOptions)
-
Method Summary
Modifier and Type Method Description PaginatedResult<Annotation>get(String messageSerial, Array<Param> params)Retrieves a paginated list of annotations associated with the specified message serial. PaginatedResult<Annotation>get(Message message, Array<Param> params)voidgetAsync(String messageSerial, Array<Param> params, Callback<AsyncPaginatedResult<Annotation>> callback)Asynchronously retrieves a paginated list of annotations associated with the specified message serial. voidgetAsync(Message message, Array<Param> params, Callback<AsyncPaginatedResult<Annotation>> callback)PaginatedResult<Annotation>get(String messageSerial)Retrieves a paginated list of annotations associated with the specified message serial. PaginatedResult<Annotation>get(Message message)voidgetAsync(String messageSerial, Callback<AsyncPaginatedResult<Annotation>> callback)Asynchronously retrieves a paginated list of annotations associated with the specified message serial. voidgetAsync(Message message, Callback<AsyncPaginatedResult<Annotation>> callback)voidpublish(String messageSerial, Annotation annotation)Publishes an annotation associated with the specified message serialto the REST channel. voidpublish(Message message, Annotation annotation)voidpublishAsync(String messageSerial, Annotation annotation, Callback<Void> callback)Asynchronously publishes an annotation associated with the specified message serialto the REST channel. voidpublishAsync(Message message, Annotation annotation, Callback<Void> callback)voiddelete(String messageSerial, Annotation annotation)Deletes an annotation associated with the specified message serial. voiddelete(Message message, Annotation annotation)voiddeleteAsync(String messageSerial, Annotation annotation, Callback<Void> callback)Asynchronously deletes an annotation associated with the specified message serial. voiddeleteAsync(Message message, Annotation annotation, Callback<Void> callback)-
-
Constructor Detail
-
RestAnnotations
RestAnnotations(String channelName, Http http, ClientOptions clientOptions, ChannelOptions channelOptions)
-
-
Method Detail
-
get
PaginatedResult<Annotation> get(String messageSerial, Array<Param> params)
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.
-
get
PaginatedResult<Annotation> get(Message message, Array<Param> params)
-
getAsync
void getAsync(String messageSerial, Array<Param> params, Callback<AsyncPaginatedResult<Annotation>> callback)
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.
-
getAsync
void getAsync(Message message, Array<Param> params, Callback<AsyncPaginatedResult<Annotation>> callback)
-
get
PaginatedResult<Annotation> get(String messageSerial)
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
-
get
PaginatedResult<Annotation> get(Message message)
-
getAsync
void getAsync(String messageSerial, Callback<AsyncPaginatedResult<Annotation>> callback)
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.
-
getAsync
void getAsync(Message message, Callback<AsyncPaginatedResult<Annotation>> callback)
-
publish
void publish(String messageSerial, Annotation annotation)
Publishes an annotation associated with the specified message serialto 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.
-
publish
void publish(Message message, Annotation annotation)
-
publishAsync
void publishAsync(String messageSerial, Annotation annotation, Callback<Void> callback)
Asynchronously publishes an annotation associated with the specified message serialto 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 acompletion indication or error information.
-
publishAsync
void publishAsync(Message message, Annotation annotation, Callback<Void> callback)
-
delete
void delete(String messageSerial, Annotation annotation)
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.
-
delete
void delete(Message message, Annotation annotation)
-
deleteAsync
void deleteAsync(String messageSerial, Annotation annotation, Callback<Void> callback)
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 completionindication or error information.
-
deleteAsync
void deleteAsync(Message message, Annotation annotation, Callback<Void> callback)
-
-
-
-