|
15 | 15 |
|
16 | 16 | import io.dapr.client.domain.ConfigurationItem; |
17 | 17 | import io.dapr.client.domain.DaprMetadata; |
| 18 | +import io.dapr.client.domain.DeleteJobRequest; |
18 | 19 | import io.dapr.client.domain.DeleteStateRequest; |
19 | 20 | import io.dapr.client.domain.ExecuteStateTransactionRequest; |
20 | 21 | import io.dapr.client.domain.GetBulkSecretRequest; |
21 | 22 | import io.dapr.client.domain.GetBulkStateRequest; |
22 | 23 | import io.dapr.client.domain.GetConfigurationRequest; |
| 24 | +import io.dapr.client.domain.GetJobRequest; |
| 25 | +import io.dapr.client.domain.GetJobResponse; |
23 | 26 | import io.dapr.client.domain.GetSecretRequest; |
24 | 27 | import io.dapr.client.domain.GetStateRequest; |
25 | 28 | import io.dapr.client.domain.HttpExtension; |
26 | 29 | import io.dapr.client.domain.InvokeBindingRequest; |
27 | 30 | import io.dapr.client.domain.InvokeMethodRequest; |
28 | 31 | import io.dapr.client.domain.PublishEventRequest; |
29 | 32 | import io.dapr.client.domain.SaveStateRequest; |
| 33 | +import io.dapr.client.domain.ScheduleJobRequest; |
30 | 34 | import io.dapr.client.domain.State; |
31 | 35 | import io.dapr.client.domain.StateOptions; |
32 | 36 | import io.dapr.client.domain.SubscribeConfigurationRequest; |
@@ -702,6 +706,50 @@ Flux<SubscribeConfigurationResponse> subscribeConfiguration(String storeName, Li |
702 | 706 | */ |
703 | 707 | Mono<DaprMetadata> getMetadata(); |
704 | 708 |
|
| 709 | + /** |
| 710 | + * Subscribe to pubsub via streaming. |
| 711 | + * @param pubsubName Name of the pubsub component. |
| 712 | + * @param topic Name of the topic to subscribe to. |
| 713 | + * @param listener Callback methods to process events. |
| 714 | + * @param type Type for object deserialization. |
| 715 | + * @return An active subscription. |
| 716 | + * @param <T> Type of object deserialization. |
| 717 | + */ |
| 718 | + <T> Subscription subscribeToEvents( |
| 719 | + String pubsubName, String topic, SubscriptionListener<T> listener, TypeRef<T> type); |
| 720 | + |
| 721 | + /** |
| 722 | + * Schedules a job using the provided job request details. |
| 723 | + * |
| 724 | + * @param scheduleJobRequest The request containing the details of the job to schedule. |
| 725 | + * Must include a name and optional schedule, data, and other related properties. |
| 726 | + * @return A {@link Mono} that completes when the job scheduling operation is successful or raises an error. |
| 727 | + * @throws IllegalArgumentException If the request or its required fields like name are null or empty. |
| 728 | + */ |
| 729 | + public Mono<Void> scheduleJob(ScheduleJobRequest scheduleJobRequest); |
| 730 | + |
| 731 | + /** |
| 732 | + * Retrieves details of a specific job. |
| 733 | + * |
| 734 | + * @param getJobRequest The request containing the job name for which the details are to be fetched. |
| 735 | + * The name property is mandatory. |
| 736 | + * @return A {@link Mono} that emits the {@link GetJobResponse} containing job details or raises an |
| 737 | + * error if the job is not found. |
| 738 | + * @throws IllegalArgumentException If the request or its required fields like name are null or empty. |
| 739 | + */ |
| 740 | + |
| 741 | + public Mono<GetJobResponse> getJob(GetJobRequest getJobRequest); |
| 742 | + |
| 743 | + /** |
| 744 | + * Deletes a job based on the given request. |
| 745 | + * |
| 746 | + * @param deleteJobRequest The request containing the job name to be deleted. |
| 747 | + * The name property is mandatory. |
| 748 | + * @return A {@link Mono} that completes when the job is successfully deleted or raises an error. |
| 749 | + * @throws IllegalArgumentException If the request or its required fields like name are null or empty. |
| 750 | + */ |
| 751 | + public Mono<Void> deleteJob(DeleteJobRequest deleteJobRequest); |
| 752 | + |
705 | 753 | /** |
706 | 754 | * Gracefully shutdown the dapr runtime. |
707 | 755 | * |
|
0 commit comments