Skip to content

Commit

Permalink
revert async sample
Browse files Browse the repository at this point in the history
  • Loading branch information
abhipsaMisra committed Sep 2, 2020
1 parent b4fda95 commit 1c772f1
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,19 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.nimbusds.jose.util.IOUtils;
import reactor.core.publisher.Mono;

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.stream.Stream;

public class AsyncSample
{
private static final ObjectMapper mapper = new ObjectMapper();
private static final Random random = new Random();

public static void main(String[] args) throws InterruptedException, IOException {
public static void main(String[] args) throws InterruptedException, JsonProcessingException {
String tenantId = System.getenv("TENANT_ID");
String clientId = System.getenv("CLIENT_ID");
String clientSecret = System.getenv("CLIENT_SECRET");
Expand Down Expand Up @@ -72,8 +63,6 @@ public static void main(String[] args) throws InterruptedException, IOException
.setCustomProperties("TemperatureUnit", "Celsius");
String dt_String = mapper.writeValueAsString(basicDigitalTwin);

System.out.println(">>>>" + dt_String);

Mono<DigitalTwinsResponse<String>> sourceTwinWithResponseString = client.createDigitalTwinWithResponse(dtId_String, dt_String);
sourceTwinWithResponseString.subscribe(
result -> {
Expand Down

0 comments on commit 1c772f1

Please sign in to comment.