Skip to content

Commit 07f4792

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

3 files changed

Lines changed: 1 addition & 33 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 & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,7 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
342342
* @param operation The operation to be performed by the binding request processor.
343343
* @param data The data to be processed, use byte[] to skip serialization.
344344
* @return an empty Mono.
345-
*
346-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
347345
*/
348-
@Deprecated
349346
Mono<Void> invokeBinding(String bindingName, String operation, Object data);
350347

351348
/**
@@ -356,10 +353,7 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
356353
* @param data The data to be processed, skipping serialization.
357354
* @param metadata The metadata map.
358355
* @return a Mono plan of type byte[].
359-
*
360-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
361356
*/
362-
@Deprecated
363357
Mono<byte[]> invokeBinding(String bindingName, String operation, byte[] data, Map<String, String> metadata);
364358

365359
/**
@@ -371,10 +365,7 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
371365
* @param type The type being returned.
372366
* @param <T> The type of the return
373367
* @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.
376368
*/
377-
@Deprecated
378369
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, TypeRef<T> type);
379370

380371
/**
@@ -386,26 +377,20 @@ Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpE
386377
* @param clazz The type being returned.
387378
* @param <T> The type of the return
388379
* @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.
391380
*/
392-
@Deprecated
393381
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Class<T> clazz);
394382

395383
/**
396384
* Invokes a Binding operation.
397-
*
385+
*as
398386
* @param bindingName The name of the binding to call.
399387
* @param operation The operation to be performed by the binding request processor.
400388
* @param data The data to be processed, use byte[] to skip serialization.
401389
* @param metadata The metadata map.
402390
* @param type The type being returned.
403391
* @param <T> The type of the return
404392
* @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.
407393
*/
408-
@Deprecated
409394
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata,
410395
TypeRef<T> type);
411396

@@ -419,10 +404,7 @@ <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map
419404
* @param clazz The type being returned.
420405
* @param <T> The type of the return
421406
* @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.
424407
*/
425-
@Deprecated
426408
<T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata,
427409
Class<T> clazz);
428410

@@ -431,10 +413,7 @@ <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map
431413
*
432414
* @param request The binding invocation request.
433415
* @return a Mono with void.
434-
*
435-
* @deprecated It is recommended to use language-native HTTP clients or gRPC clients for binding invocation instead.
436416
*/
437-
@Deprecated
438417
Mono<Void> invokeBinding(InvokeBindingRequest request);
439418

440419
/**
@@ -444,10 +423,7 @@ <T> Mono<T> invokeBinding(String bindingName, String operation, Object data, Map
444423
* @param type The type being returned.
445424
* @param <T> The type of the return
446425
* @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.
449426
*/
450-
@Deprecated
451427
<T> Mono<T> invokeBinding(InvokeBindingRequest request, TypeRef<T> type);
452428

453429
/**

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)