Skip to content

Commit

Permalink
Generate updated javadocs for 1.8.0
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <asouza.pro@gmail.com>
  • Loading branch information
artursouza committed Feb 16, 2023
1 parent 5542b47 commit 894021f
Show file tree
Hide file tree
Showing 849 changed files with 401,851 additions and 154,988 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ For a Maven project, add the following to your `pom.xml` file:
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<!-- Dapr's SDK for Actors (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-actors</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<!-- Dapr's SDK integration with SpringBoot (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-springboot</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
...
</dependencies>
Expand All @@ -78,11 +78,11 @@ For a Gradle project, add the following to your `build.gradle` file:
dependencies {
...
// Dapr's core SDK with all features, except Actors.
compile('io.dapr:dapr-sdk:1.7.1')
compile('io.dapr:dapr-sdk:1.8.0')
// Dapr's SDK for Actors (optional).
compile('io.dapr:dapr-sdk-actors:1.7.1')
compile('io.dapr:dapr-sdk-actors:1.8.0')
// Dapr's SDK integration with SpringBoot (optional).
compile('io.dapr:dapr-sdk-springboot:1.7.1')
compile('io.dapr:dapr-sdk-springboot:1.8.0')
}
```

Expand Down
14 changes: 7 additions & 7 deletions daprdocs/content/en/java-sdk-docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ For a Maven project, add the following to your `pom.xml` file:
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<!-- Dapr's SDK for Actors (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-actors</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<!-- Dapr's SDK integration with SpringBoot (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-springboot</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
...
</dependencies>
Expand All @@ -57,11 +57,11 @@ For a Gradle project, add the following to your `build.gradle` file:
dependencies {
...
// Dapr's core SDK with all features, except Actors.
compile('io.dapr:dapr-sdk:1.7.1')
compile('io.dapr:dapr-sdk:1.8.0')
// Dapr's SDK for Actors (optional).
compile('io.dapr:dapr-sdk-actors:1.7.1')
compile('io.dapr:dapr-sdk-actors:1.8.0')
// Dapr's SDK integration with SpringBoot (optional).
compile('io.dapr:dapr-sdk-springboot:1.7.1')
compile('io.dapr:dapr-sdk-springboot:1.8.0')
}
```

Expand All @@ -72,7 +72,7 @@ You can fix this by specifying a compatible OkHttp version in your project to ma
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.0</version>
<version>1.8.0</version>
</dependency>
```

Expand Down
87 changes: 76 additions & 11 deletions daprdocs/content/en/java-sdk-docs/_index.mdbak
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ For a Maven project, add the following to your `pom.xml` file:
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<!-- Dapr's SDK for Actors (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-actors</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
<!-- Dapr's SDK integration with SpringBoot (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-springboot</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
...
</dependencies>
Expand All @@ -57,11 +57,11 @@ For a Gradle project, add the following to your `build.gradle` file:
dependencies {
...
// Dapr's core SDK with all features, except Actors.
compile('io.dapr:dapr-sdk:1.7.0')
compile('io.dapr:dapr-sdk:1.7.1')
// Dapr's SDK for Actors (optional).
compile('io.dapr:dapr-sdk-actors:1.7.0')
compile('io.dapr:dapr-sdk-actors:1.7.1')
// Dapr's SDK integration with SpringBoot (optional).
compile('io.dapr:dapr-sdk-springboot:1.7.0')
compile('io.dapr:dapr-sdk-springboot:1.7.1')
}
```

Expand All @@ -72,7 +72,7 @@ You can fix this by specifying a compatible OkHttp version in your project to ma
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>1.7.1</version>
<version>1.8.0</version>
</dependency>
```

Expand Down Expand Up @@ -148,7 +148,13 @@ try (DaprClient client = (new DaprClientBuilder()).build()) {
```java
import com.fasterxml.jackson.databind.ObjectMapper;
import io.dapr.Topic;
import io.dapr.client.domain.BulkSubscribeAppResponse;
import io.dapr.client.domain.BulkSubscribeAppResponseEntry;
import io.dapr.client.domain.BulkSubscribeAppResponseStatus;
import io.dapr.client.domain.BulkSubscribeMessage;
import io.dapr.client.domain.BulkSubscribeMessageEntry;
import io.dapr.client.domain.CloudEvent;
import io.dapr.springboot.annotations.BulkSubscribe;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
Expand Down Expand Up @@ -186,6 +192,62 @@ public class SubscriberController {
});
}

@BulkSubscribe()
@Topic(name = "testingtopicbulk", pubsubName = "${myAppProperty:messagebus}")
@PostMapping(path = "/testingtopicbulk")
public Mono<BulkSubscribeAppResponse> handleBulkMessage(
@RequestBody(required = false) BulkSubscribeMessage<CloudEvent<String>> bulkMessage) {
return Mono.fromCallable(() -> {
if (bulkMessage.getEntries().size() == 0) {
return new BulkSubscribeAppResponse(new ArrayList<BulkSubscribeAppResponseEntry>());
}

System.out.println("Bulk Subscriber received " + bulkMessage.getEntries().size() + " messages.");

List<BulkSubscribeAppResponseEntry> entries = new ArrayList<BulkSubscribeAppResponseEntry>();
for (BulkSubscribeMessageEntry<?> entry : bulkMessage.getEntries()) {
try {
System.out.printf("Bulk Subscriber message has entry ID: %s\n", entry.getEntryId());
CloudEvent<?> cloudEvent = (CloudEvent<?>) entry.getEvent();
System.out.printf("Bulk Subscriber got: %s\n", cloudEvent.getData());
entries.add(new BulkSubscribeAppResponseEntry(entry.getEntryId(), BulkSubscribeAppResponseStatus.SUCCESS));
} catch (Exception e) {
e.printStackTrace();
entries.add(new BulkSubscribeAppResponseEntry(entry.getEntryId(), BulkSubscribeAppResponseStatus.RETRY));
}
}
return new BulkSubscribeAppResponse(entries);
});
}
}
```

##### Bulk Publish Messages
> Note: API is in Alpha stage


```java
import io.dapr.client.DaprClientBuilder;
import io.dapr.client.DaprPreviewClient;
import io.dapr.client.domain.BulkPublishResponse;
import io.dapr.client.domain.BulkPublishResponseFailedEntry;
import java.util.ArrayList;
import java.util.List;
class Solution {
public void publishMessages() {
try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient()) {
// Create a list of messages to publish
List<String> messages = new ArrayList<>();
for (int i = 0; i < NUM_MESSAGES; i++) {
String message = String.format("This is message #%d", i);
messages.add(message);
System.out.println("Going to publish message : " + message);
}

// Publish list of messages using the bulk publish API
BulkPublishResponse<String> res = client.publishEvents(PUBSUB_NAME, TOPIC_NAME, "text/plain", messages).block()
}
}
}
```

Expand Down Expand Up @@ -292,13 +354,16 @@ try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient())
// Get configuration for a single key
Mono<ConfigurationItem> item = client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY).block();

// Get Configurations for multiple keys
Mono<List<ConfigurationItem>> items =
// Get configurations for multiple keys
Mono<Map<String, ConfigurationItem>> items =
client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);

// Susbcribe to Confifuration changes
Flux<List<ConfigurationItem>> outFlux = client.subscribeToConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
// Subscribe to configuration changes
Flux<SubscribeConfigurationResponse> outFlux = client.subscribeConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
outFlux.subscribe(configItems -> configItems.forEach(...));

// Unsubscribe from configuration changes
Mono<UnsubscribeConfigurationResponse> unsubscribe = client.unsubscribeConfiguration(SUBSCRIPTION_ID, CONFIG_STORE_NAME)
}
```

Expand Down
Loading

0 comments on commit 894021f

Please sign in to comment.