@@ -646,11 +646,11 @@ default <SVC> SVC service(Class<SVC> clazz) {
646646 * Client client = Client.connect("http://localhost:8080");
647647 *
648648 * // Use call() with method reference and wait for the result
649- * Response<GreetingResponse> response = client.toService (Greeter.class)
649+ * Response<GreetingResponse> response = client.serviceHandle (Greeter.class)
650650 * .call(Greeter::greet, new Greeting("Alice"));
651651 *
652652 * // Use send() for one-way invocation without waiting
653- * SendResponse<GreetingResponse> sendResponse = client.toService (Greeter.class)
653+ * SendResponse<GreetingResponse> sendResponse = client.serviceHandle (Greeter.class)
654654 * .send(Greeter::greet, new Greeting("Alice"));
655655 * }</pre>
656656 *
@@ -660,22 +660,14 @@ default <SVC> SVC service(Class<SVC> clazz) {
660660 * @param clazz the service class annotated with {@link Service}
661661 * @return a handle to invoke the service with advanced options
662662 */
663- default <SVC > ClientServiceHandle <SVC > toService (Class <SVC > clazz ) {
663+ default <SVC > ClientServiceHandle <SVC > serviceHandle (Class <SVC > clazz ) {
664664 ReflectionUtils .mustHaveServiceAnnotation (clazz );
665665 if (ReflectionUtils .isKotlinClass (clazz )) {
666666 throw new IllegalArgumentException ("Using Kotlin classes with Java's API is not supported" );
667667 }
668668 return new ClientServiceHandleImpl <>(this , clazz , null );
669669 }
670670
671- /**
672- * @deprecated Renamed to {@link #toService(Class)}.
673- */
674- @ Deprecated (since = "2.9" , forRemoval = true )
675- default <SVC > ClientServiceHandle <SVC > serviceHandle (Class <SVC > clazz ) {
676- return toService (clazz );
677- }
678-
679671 /**
680672 * Simple API to invoke a Restate Virtual Object from the ingress.
681673 *
@@ -691,8 +683,8 @@ default <SVC> ClientServiceHandle<SVC> serviceHandle(Class<SVC> clazz) {
691683 * }</pre>
692684 *
693685 * <p>For advanced use cases requiring asynchronous request handling, access to {@link Response}
694- * metadata, or invocation options (such as idempotency keys), use {@link #toVirtualObject(Class,
695- * String)} instead.
686+ * metadata, or invocation options (such as idempotency keys), use {@link
687+ * #virtualObjectHandle(Class, String)} instead.
696688 *
697689 * @param clazz the virtual object class annotated with {@link VirtualObject}
698690 * @param key the key identifying the specific virtual object instance
@@ -736,11 +728,11 @@ default <SVC> SVC virtualObject(Class<SVC> clazz, String key) {
736728 * Client client = Client.connect("http://localhost:8080");
737729 *
738730 * // Use call() with method reference and wait for the result
739- * Response<Integer> response = client.toVirtualObject (Counter.class, "my-counter")
731+ * Response<Integer> response = client.virtualObjectHandle (Counter.class, "my-counter")
740732 * .call(Counter::increment);
741733 *
742734 * // Use send() for one-way invocation without waiting
743- * SendResponse<Integer> sendResponse = client.toVirtualObject (Counter.class, "my-counter")
735+ * SendResponse<Integer> sendResponse = client.virtualObjectHandle (Counter.class, "my-counter")
744736 * .send(Counter::increment);
745737 * }</pre>
746738 *
@@ -751,22 +743,14 @@ default <SVC> SVC virtualObject(Class<SVC> clazz, String key) {
751743 * @param key the key identifying the specific virtual object instance
752744 * @return a handle to invoke the virtual object with advanced options
753745 */
754- default <SVC > ClientServiceHandle <SVC > toVirtualObject (Class <SVC > clazz , String key ) {
746+ default <SVC > ClientServiceHandle <SVC > virtualObjectHandle (Class <SVC > clazz , String key ) {
755747 ReflectionUtils .mustHaveVirtualObjectAnnotation (clazz );
756748 if (ReflectionUtils .isKotlinClass (clazz )) {
757749 throw new IllegalArgumentException ("Using Kotlin classes with Java's API is not supported" );
758750 }
759751 return new ClientServiceHandleImpl <>(this , clazz , key );
760752 }
761753
762- /**
763- * @deprecated Renamed to {@link #toVirtualObject(Class, String)}.
764- */
765- @ Deprecated (since = "2.9" , forRemoval = true )
766- default <SVC > ClientServiceHandle <SVC > virtualObjectHandle (Class <SVC > clazz , String key ) {
767- return toVirtualObject (clazz , key );
768- }
769-
770754 /**
771755 * Simple API to invoke a Restate Workflow from the ingress.
772756 *
@@ -782,7 +766,7 @@ default <SVC> ClientServiceHandle<SVC> virtualObjectHandle(Class<SVC> clazz, Str
782766 * }</pre>
783767 *
784768 * <p>For advanced use cases requiring asynchronous request handling, access to {@link Response}
785- * metadata, or invocation options (such as idempotency keys), use {@link #toWorkflow (Class,
769+ * metadata, or invocation options (such as idempotency keys), use {@link #workflowHandle (Class,
786770 * String)} instead.
787771 *
788772 * @param clazz the workflow class annotated with {@link Workflow}
@@ -827,11 +811,11 @@ default <SVC> SVC workflow(Class<SVC> clazz, String key) {
827811 * Client client = Client.connect("http://localhost:8080");
828812 *
829813 * // Use call() with method reference and wait for the result
830- * Response<OrderResult> response = client.toWorkflow (OrderWorkflow.class, "order-123")
814+ * Response<OrderResult> response = client.workflowHandle (OrderWorkflow.class, "order-123")
831815 * .call(OrderWorkflow::start, new OrderRequest(...));
832816 *
833817 * // Use send() for one-way invocation without waiting
834- * SendResponse<OrderResult> sendResponse = client.toWorkflow (OrderWorkflow.class, "order-123")
818+ * SendResponse<OrderResult> sendResponse = client.workflowHandle (OrderWorkflow.class, "order-123")
835819 * .send(OrderWorkflow::start, new OrderRequest(...));
836820 * }</pre>
837821 *
@@ -842,22 +826,14 @@ default <SVC> SVC workflow(Class<SVC> clazz, String key) {
842826 * @param key the key identifying the specific workflow instance
843827 * @return a handle to invoke the workflow with advanced options
844828 */
845- default <SVC > ClientServiceHandle <SVC > toWorkflow (Class <SVC > clazz , String key ) {
829+ default <SVC > ClientServiceHandle <SVC > workflowHandle (Class <SVC > clazz , String key ) {
846830 ReflectionUtils .mustHaveWorkflowAnnotation (clazz );
847831 if (ReflectionUtils .isKotlinClass (clazz )) {
848832 throw new IllegalArgumentException ("Using Kotlin classes with Java's API is not supported" );
849833 }
850834 return new ClientServiceHandleImpl <>(this , clazz , key );
851835 }
852836
853- /**
854- * @deprecated Renamed to {@link #toWorkflow(Class, String)}.
855- */
856- @ Deprecated (since = "2.9" , forRemoval = true )
857- default <SVC > ClientServiceHandle <SVC > workflowHandle (Class <SVC > clazz , String key ) {
858- return toWorkflow (clazz , key );
859- }
860-
861837 /**
862838 * Create a default JDK client.
863839 *
0 commit comments