From d4174e304951150db31f721dea9d45e7ea54d0ed Mon Sep 17 00:00:00 2001 From: Franko Morales <67804607+cochi2@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:22:08 -0700 Subject: [PATCH] Making ProgressReporter private. (#22331) --- .../azure/communication/callingserver/ContentDownloader.java | 1 - .../callingserver/{models => }/ProgressReceiver.java | 3 ++- .../callingserver/{models => }/ProgressReporter.java | 4 ++-- .../callingserver/models/ParallelDownloadOptions.java | 1 + .../src/main/java/module-info.java | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) rename sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/{models => }/ProgressReceiver.java (90%) rename sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/{models => }/ProgressReporter.java (98%) diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java index 6ee8317fe7f1c..aa05aba5e77bf 100644 --- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ContentDownloader.java @@ -5,7 +5,6 @@ import com.azure.communication.callingserver.implementation.Constants; import com.azure.communication.callingserver.models.CallingServerErrorException; import com.azure.communication.callingserver.models.ParallelDownloadOptions; -import com.azure.communication.callingserver.models.ProgressReporter; import com.azure.core.http.HttpMethod; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpRange; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ProgressReceiver.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ProgressReceiver.java similarity index 90% rename from sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ProgressReceiver.java rename to sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ProgressReceiver.java index 6e300e663bcce..671046266a370 100644 --- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ProgressReceiver.java +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ProgressReceiver.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.communication.callingserver.models; +package com.azure.communication.callingserver; +import com.azure.communication.callingserver.models.ParallelDownloadOptions; import reactor.core.publisher.Flux; /** diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ProgressReporter.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ProgressReporter.java similarity index 98% rename from sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ProgressReporter.java rename to sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ProgressReporter.java index 79a5e62f2e13c..bb21764390289 100644 --- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ProgressReporter.java +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ProgressReporter.java @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.communication.callingserver.models; +package com.azure.communication.callingserver; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -13,7 +13,7 @@ /** * {@code ProgressReporter} offers a convenient way to add progress tracking to a given Flux. */ -public final class ProgressReporter { +final class ProgressReporter { private abstract static class ProgressReporterImpl implements ProgressReceiver { long blockProgress; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java index 66519aad53ac2..b72c5f5f85fe0 100644 --- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java +++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/ParallelDownloadOptions.java @@ -3,6 +3,7 @@ package com.azure.communication.callingserver.models; +import com.azure.communication.callingserver.ProgressReceiver; import com.azure.communication.callingserver.implementation.Constants.ContentDownloader; import com.azure.core.annotation.Fluent; diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java b/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java index b3ead38e94a3b..5d9b0f10d9ff8 100644 --- a/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java +++ b/sdk/communication/azure-communication-callingserver/src/main/java/module-info.java @@ -13,4 +13,5 @@ // exporting some packages specifically for Jackson opens com.azure.communication.callingserver.models to com.fasterxml.jackson.databind; opens com.azure.communication.callingserver.implementation.models to com.fasterxml.jackson.databind, com.azure.core; + opens com.azure.communication.callingserver to com.fasterxml.jackson.databind; }