Skip to content

Commit aca0121

Browse files
committed
Mark HTTP support as deprecated to be removed in a future release.
1 parent 44f80c9 commit aca0121

File tree

8 files changed

+21
-1
lines changed

8 files changed

+21
-1
lines changed

sdk-actors/src/main/java/io/dapr/actors/client/DaprHttpClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* DaprClient over HTTP for actor client.
2121
*
2222
* @see DaprHttp
23+
*
24+
* @deprecated Use {@link DaprGrpcClient} instead, this will be removed in a future release.
2325
*/
2426
class DaprHttpClient implements DaprClient {
2527

@@ -34,6 +36,7 @@ class DaprHttpClient implements DaprClient {
3436
* Instantiates a new Dapr Http Client to invoke Actors.
3537
*
3638
* @param client Dapr's http client.
39+
*
3740
*/
3841
DaprHttpClient(DaprHttp client) {
3942
this.client = client;

sdk-actors/src/main/java/io/dapr/actors/runtime/DaprHttpClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
/**
2626
* A DaprClient over HTTP for Actor's runtime.
27+
* @deprecated Use {@link io.dapr.actors.runtime.DaprGrpcClient} instead, this will be removed in a future release.
2728
*/
2829
class DaprHttpClient implements DaprClient {
2930

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
public enum DaprApiProtocol {
2020

2121
GRPC,
22+
/** @deprecated HTTP support is being deprecated; use GRPC instead. This will be removed in a future release */
2223
HTTP
2324

2425
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424

2525
/**
2626
* A builder for the DaprClient,
27-
* Currently only gRPC and HTTP Client will be supported.
27+
* Currently both gRPC and HTTP clients are supported but gRPC is recommended.
28+
* Note: HTTP support is being deprecated and will be removed in a future release.
2829
*/
2930
public class DaprClientBuilder {
3031

@@ -40,6 +41,8 @@ public class DaprClientBuilder {
4041

4142
/**
4243
* Builder for Dapr's HTTP Client.
44+
*
45+
* @deprecated HTTP support is being deprecated; use gRPC instead. This will be removed in a future release.
4346
*/
4447
private final DaprHttpBuilder daprHttpBuilder;
4548

@@ -172,6 +175,8 @@ private DaprClient buildDaprClientGrpc() {
172175
* Creates and instance of DaprClient over HTTP.
173176
*
174177
* @return DaprClient over HTTP.
178+
*
179+
* @deprecated HTTP support is being deprecated; Use the gRPC builder method (buildDaprClientGrpc) instead. This will be removed in a future release.
175180
*/
176181
private DaprClient buildDaprClientHttp() {
177182
return new DaprClientHttp(this.daprHttpBuilder.build(), this.objectSerializer, this.stateSerializer);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
*
6363
* @see io.dapr.client.DaprHttp
6464
* @see io.dapr.client.DaprClient
65+
*
66+
* @deprecated HTTP support is being deprecated; use {@link io.dapr.client.DaprClientGrpc} instead. This will be removed in a future release.
6567
*/
6668
public class DaprClientHttp extends AbstractDaprClient {
6769
/**

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
import java.util.UUID;
4444
import java.util.concurrent.CompletableFuture;
4545

46+
/**
47+
* @deprecated HTTP support is being deprecated; use gRPC instead. This will be removed in a future release.
48+
*/
4649
public class DaprHttp implements AutoCloseable {
4750

4851
/**

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424
/**
2525
* A builder for the DaprHttp.
26+
*
27+
* @deprecated HTTP support is being deprecated; use gRPC instead. This will be removed in a future release.
28+
*
2629
*/
2730
public class DaprHttpBuilder {
2831

sdk/src/main/java/io/dapr/config/Properties.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public class Properties {
4545

4646
/**
4747
* Dapr's default use of gRPC or HTTP for Dapr's method invocation APIs.
48+
*
49+
* @deprecated HTTP support is being deprecated; use gRPC instead. This will be removed in a future release.
4850
*/
4951
private static final DaprApiProtocol DEFAULT_API_METHOD_INVOCATION_PROTOCOL = DaprApiProtocol.HTTP;
5052

0 commit comments

Comments
 (0)