Skip to content

Commit

Permalink
Mark plugin API as preview (#4558)
Browse files Browse the repository at this point in the history
  • Loading branch information
sugmanue authored Oct 6, 2023
1 parent aa3e3ed commit f36f672
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.TreeMap;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Immutable;
import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.interceptor.ExecutionAttribute;
Expand Down Expand Up @@ -153,6 +154,7 @@ public List<MetricPublisher> metricPublishers() {
/**
* Return the plugins that will be used to update the configuration used by the request.
*/
@SdkPreviewApi
public List<SdkPlugin> plugins() {
return plugins;
}
Expand Down Expand Up @@ -494,11 +496,13 @@ default B putRawQueryParameter(String name, String value) {
*
* @param plugin The plugin to add.
*/
@SdkPreviewApi
B addPlugin(SdkPlugin plugin);

/**
* Returns the list of registered plugins
*/
@SdkPreviewApi
List<SdkPlugin> plugins();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package software.amazon.awssdk.core;

import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.utils.SdkAutoCloseable;
Expand All @@ -23,6 +24,7 @@
* A plugin modifies a client's configuration when the client is created or at request execution
* time.
*/
@SdkPreviewApi
@SdkPublicApi
@ThreadSafe
@FunctionalInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.net.URI;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
Expand Down Expand Up @@ -82,13 +83,15 @@ default B putAuthScheme(AuthScheme<?> authScheme) {
* Adds a plugin to the client builder. The plugins will be invoked when building the client to allow them to change the
* configuration of the built client.
*/
@SdkPreviewApi
default B addPlugin(SdkPlugin plugin) {
throw new UnsupportedOperationException();
}

/**
* Returns the list of plugins configured on the client builder.
*/
@SdkPreviewApi
default List<SdkPlugin> plugins() {
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import software.amazon.awssdk.annotations.SdkPreviewApi;
import software.amazon.awssdk.annotations.SdkProtectedApi;
import software.amazon.awssdk.annotations.SdkTestInternalApi;
import software.amazon.awssdk.core.CompressionConfiguration;
Expand Down Expand Up @@ -409,6 +410,7 @@ private SdkClientConfiguration finalizeConfiguration(SdkClientConfiguration conf
* By default, returns the configuration as-is. Classes extending this method will take care of running the plugins and
* return the updated configuration if plugins are supported.
*/
@SdkPreviewApi
protected SdkClientConfiguration invokePlugins(SdkClientConfiguration config) {
return config;
}
Expand Down

0 comments on commit f36f672

Please sign in to comment.