Skip to content

Commit 50b0163

Browse files
committed
chore: Deprecate invoke methods
Signed-off-by: Javier Aliaga <javier@diagrid.io>
1 parent 0d74311 commit 50b0163

3 files changed

Lines changed: 1 addition & 31 deletions

File tree

sdk/src/main/java/io/dapr/client/AbstractDaprClient.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ public Mono<byte[]> invokeMethod(
231231
* {@inheritDoc}
232232
*/
233233
@Override
234-
@Deprecated
235234
public Mono<Void> invokeBinding(String bindingName, String operation, Object data) {
236235
return this.invokeBinding(bindingName, operation, data, null, TypeRef.BYTE_ARRAY).then();
237236
}
@@ -240,7 +239,6 @@ public Mono<Void> invokeBinding(String bindingName, String operation, Object dat
240239
* {@inheritDoc}
241240
*/
242241
@Override
243-
@Deprecated
244242
public Mono<byte[]> invokeBinding(String bindingName, String operation, byte[] data, Map<String, String> metadata) {
245243
return this.invokeBinding(bindingName, operation, data, metadata, TypeRef.BYTE_ARRAY);
246244
}
@@ -249,7 +247,6 @@ public Mono<byte[]> invokeBinding(String bindingName, String operation, byte[] d
249247
* {@inheritDoc}
250248
*/
251249
@Override
252-
@Deprecated
253250
public <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, TypeRef<T> type) {
254251
return this.invokeBinding(bindingName, operation, data, null, type);
255252
}
@@ -258,7 +255,6 @@ public <T> Mono<T> invokeBinding(String bindingName, String operation, Object da
258255
* {@inheritDoc}
259256
*/
260257
@Override
261-
@Deprecated
262258
public <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Class<T> clazz) {
263259
return this.invokeBinding(bindingName, operation, data, null, TypeRef.get(clazz));
264260
}
@@ -267,7 +263,6 @@ public <T> Mono<T> invokeBinding(String bindingName, String operation, Object da
267263
* {@inheritDoc}
268264
*/
269265
@Override
270-
@Deprecated
271266
public <T> Mono<T> invokeBinding(
272267
String bindingName, String operation, Object data, Map<String, String> metadata, TypeRef<T> type) {
273268
InvokeBindingRequest request = new InvokeBindingRequest(bindingName, operation)
@@ -281,7 +276,6 @@ public <T> Mono<T> invokeBinding(
281276
* {@inheritDoc}
282277
*/
283278
@Override
284-
@Deprecated
285279
public <T> Mono<T> invokeBinding(
286280
String bindingName, String operation, Object data, Map<String, String> metadata, Class<T> clazz) {
287281
return this.invokeBinding(bindingName, operation, data, metadata, TypeRef.get(clazz));
@@ -291,7 +285,6 @@ public <T> Mono<T> invokeBinding(
291285
* {@inheritDoc}
292286
*/
293287
@Override
294-
@Deprecated
295288
public Mono<Void> invokeBinding(InvokeBindingRequest request) {
296289
return this.invokeBinding(request, TypeRef.VOID);
297290
}

sdk/src/main/java/io/dapr/client/DaprClient.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,7 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
343343
* @param data The data to be processed, use byte[] to skip serialization.
344344
* @return an empty Mono.
345345
*
346-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
347346
*/
348-
@Deprecated
349347
Mono<Void> invokeBinding(String bindingName, String operation, Object data);
350348

351349
/**
@@ -357,9 +355,7 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
357355
* @param metadata The metadata map.
358356
* @return a Mono plan of type byte[].
359357
*
360-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
361358
*/
362-
@Deprecated
363359
Mono<byte[]> invokeBinding(String bindingName, String operation, byte[] data, Map<String, String> metadata);
364360

365361
/**
@@ -371,10 +367,7 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
371367
* @param type The type being returned.
372368
* @param <T> The type of the return
373369
* @return a Mono plan of type T.
374-
*
375-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
376370
*/
377-
@Deprecated
378371
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, TypeRef<T> type);
379372

380373
/**
@@ -386,26 +379,20 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
386379
* @param clazz The type being returned.
387380
* @param <T> The type of the return
388381
* @return a Mono plan of type T.
389-
*
390-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
391382
*/
392-
@Deprecated
393383
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Class<T> clazz);
394384

395385
/**
396386
* Invokes a Binding operation.
397-
*
387+
*as
398388
* @param bindingName The name of the binding to call.
399389
* @param operation The operation to be performed by the binding request processor.
400390
* @param data The data to be processed, use byte[] to skip serialization.
401391
* @param metadata The metadata map.
402392
* @param type The type being returned.
403393
* @param <T> The type of the return
404394
* @return a Mono plan of type T.
405-
*
406-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
407395
*/
408-
@Deprecated
409396
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata,
410397
TypeRef<T> type);
411398

@@ -419,10 +406,7 @@ <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map
419406
* @param clazz The type being returned.
420407
* @param <T> The type of the return
421408
* @return a Mono plan of type T.
422-
*
423-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
424409
*/
425-
@Deprecated
426410
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata,
427411
Class<T> clazz);
428412

@@ -431,10 +415,7 @@ <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map
431415
*
432416
* @param request The binding invocation request.
433417
* @return a Mono with void.
434-
*
435-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
436418
*/
437-
@Deprecated
438419
Mono<Void> invokeBinding(InvokeBindingRequest request);
439420

440421
/**
@@ -444,10 +425,7 @@ <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map
444425
* @param type The type being returned.
445426
* @param <T> The type of the return
446427
* @return a Mono plan of type T.
447-
*
448-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
449428
*/
450-
@Deprecated
451429
<T> Mono<T> invokeBinding(InvokeBindingRequest request, TypeRef<T> type);
452430

453431
/**

sdk/src/main/java/io/dapr/client/DaprClientImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ private <T> Mono<T> getMonoForHttpResponse(TypeRef<T> type, DaprHttp.Response r)
677677
* {@inheritDoc}
678678
*/
679679
@Override
680-
@Deprecated
681680
public <T> Mono<T> invokeBinding(InvokeBindingRequest request, TypeRef<T> type) {
682681
try {
683682
final String name = request.getName();

0 commit comments

Comments
 (0)