Skip to content

Commit 25a89fc

Browse files
committed
Mark the SSE and WebSocket modules as experimental
Annotated the public API types of the httpclient5-sse and httpclient5-websocket modules with @experimental. Both modules expose a large API surface that is not yet stable, and the annotation marks them as subject to change so that a relaxed compatibility policy applies for the 5.7 release series; the japicmp binary and source compatibility checks are already skipped for both modules. Types that are already marked @internal are left unchanged.
1 parent 3b4ff29 commit 25a89fc

39 files changed

Lines changed: 93 additions & 0 deletions

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/BackoffStrategy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@
2626
*/
2727
package org.apache.hc.client5.http.sse;
2828

29+
import org.apache.hc.core5.annotation.Experimental;
30+
2931
/**
3032
* Computes the next reconnect delay for SSE (in milliseconds).
3133
* <p>
3234
* Implementations may also override {@link #shouldReconnect(int, long, Long)}
3335
* to decline reconnects entirely (e.g., a "no strategy" that never reconnects).
3436
*/
37+
@Experimental
3538
public interface BackoffStrategy {
3639

3740
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/EventSource.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.Map;
3030

3131
import org.apache.hc.core5.annotation.Contract;
32+
import org.apache.hc.core5.annotation.Experimental;
3233

3334
/**
3435
* Represents a Server-Sent Events (SSE) connection to a remote resource.
@@ -52,6 +53,7 @@
5253
* @since 5.7
5354
*/
5455
@Contract
56+
@Experimental
5557
public interface EventSource {
5658

5759
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/EventSourceConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.Objects;
3030

3131
import org.apache.hc.client5.http.sse.impl.ExponentialJitterBackoff;
32+
import org.apache.hc.core5.annotation.Experimental;
3233

3334
/**
3435
* Immutable configuration for {@link EventSource} behavior, primarily covering
@@ -50,6 +51,7 @@
5051
*
5152
* @since 5.7
5253
*/
54+
@Experimental
5355
public final class EventSourceConfig {
5456

5557
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/EventSourceListener.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
package org.apache.hc.client5.http.sse;
2828

29+
import org.apache.hc.core5.annotation.Experimental;
30+
2931
/**
3032
* Callback interface for receiving Server-Sent Events (SSE) and lifecycle
3133
* notifications from an {@link EventSource}.
@@ -58,6 +60,7 @@
5860
* @since 5.7
5961
*/
6062
@FunctionalInterface
63+
@Experimental
6164
public interface EventSourceListener {
6265

6366
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/SseExecutor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
4141
import org.apache.hc.client5.http.sse.impl.DefaultEventSource;
4242
import org.apache.hc.client5.http.sse.impl.SseParser;
43+
import org.apache.hc.core5.annotation.Experimental;
4344
import org.apache.hc.core5.reactor.IOReactorStatus;
4445
import org.apache.hc.core5.util.Args;
4546
import org.apache.hc.core5.util.TimeValue;
@@ -82,6 +83,7 @@
8283
*
8384
* @since 5.7
8485
*/
86+
@Experimental
8587
public final class SseExecutor {
8688

8789
// Visible for tests

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/SseExecutorBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
3636
import org.apache.hc.client5.http.sse.impl.SseParser;
37+
import org.apache.hc.core5.annotation.Experimental;
3738
import org.apache.hc.core5.util.Args;
3839

3940
/**
@@ -62,6 +63,7 @@
6263
*
6364
* @since 5.7
6465
*/
66+
@Experimental
6567
public final class SseExecutorBuilder {
6668

6769
private CloseableHttpAsyncClient client;

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/impl/ExponentialJitterBackoff.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.concurrent.ThreadLocalRandom;
3030

3131
import org.apache.hc.client5.http.sse.BackoffStrategy;
32+
import org.apache.hc.core5.annotation.Experimental;
3233

3334
/**
3435
* Backoff strategy that computes exponential delays with <em>full jitter</em> and
@@ -51,6 +52,7 @@
5152
*
5253
* @since 5.7
5354
*/
55+
@Experimental
5456
public final class ExponentialJitterBackoff implements BackoffStrategy {
5557

5658
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/impl/FixedBackoffStrategy.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import org.apache.hc.client5.http.sse.BackoffStrategy;
3030
import org.apache.hc.client5.http.sse.EventSourceConfig;
31+
import org.apache.hc.core5.annotation.Experimental;
3132

3233
/**
3334
* Backoff strategy that uses a fixed delay between reconnect attempts and
@@ -49,6 +50,7 @@
4950
* @see EventSourceConfig
5051
* @since 5.7
5152
*/
53+
@Experimental
5254
public final class FixedBackoffStrategy implements BackoffStrategy {
5355

5456
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/impl/NoBackoffStrategy.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
package org.apache.hc.client5.http.sse.impl;
2828

2929
import org.apache.hc.client5.http.sse.BackoffStrategy;
30+
import org.apache.hc.core5.annotation.Experimental;
3031

3132
/**
3233
* Backoff policy that <strong>never reconnects</strong>.
@@ -45,6 +46,7 @@
4546
*
4647
* @since 5.7
4748
*/
49+
@Experimental
4850
public final class NoBackoffStrategy implements BackoffStrategy {
4951

5052
/**

httpclient5-sse/src/main/java/org/apache/hc/client5/http/sse/impl/SseParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
*/
2727
package org.apache.hc.client5.http.sse.impl;
2828

29+
import org.apache.hc.core5.annotation.Experimental;
30+
2931
/**
3032
* Parser strategy for SSE entity consumption.
3133
*
@@ -38,6 +40,7 @@
3840
*
3941
* @since 5.7
4042
*/
43+
@Experimental
4144
public enum SseParser {
4245
/**
4346
* CharBuffer → spec reader.

0 commit comments

Comments
 (0)