Skip to content

Commit

Permalink
Merge pull request quarkusio#44636 from mkouba/issue-44469-next
Browse files Browse the repository at this point in the history
WebSockets Next: mark the extension as "stable"
  • Loading branch information
geoand authored Nov 22, 2024
2 parents 8b4ef3a + 64c42a6 commit cbd735f
Show file tree
Hide file tree
Showing 46 changed files with 23 additions and 98 deletions.
1 change: 0 additions & 1 deletion docs/src/main/asciidoc/websockets-next-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ include::_attributes.adoc[]
:categories: web
:topics: web,websockets
:extensions: io.quarkus:quarkus-websockets-next
:extension-status: experimental

include::{includes}/extension-status.adoc[]

Expand Down
1 change: 0 additions & 1 deletion docs/src/main/asciidoc/websockets-next-tutorial.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ include::_attributes.adoc[]
:summary: This guide explains how your Quarkus application can utilize web sockets to create interactive web applications. This guide uses the WebSockets Next extension
:topics: web,websockets
:extensions: io.quarkus:quarkus-websockets-next
:extension-status: experimental

This guide explains how your Quarkus application can utilize web sockets to create interactive web applications.
In this guide, we will develop a very simple chat application using web sockets to receive and send messages to the other connected users.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@
import io.quarkus.websockets.next.WebSocketConnection;
import io.quarkus.websockets.next.WebSocketException;
import io.quarkus.websockets.next.WebSocketServerException;
import io.quarkus.websockets.next.WebSocketsServerBuildConfig;
import io.quarkus.websockets.next.deployment.Callback.MessageType;
import io.quarkus.websockets.next.deployment.Callback.Target;
import io.quarkus.websockets.next.deployment.config.WebSocketsServerBuildConfig;
import io.quarkus.websockets.next.runtime.BasicWebSocketConnectorImpl;
import io.quarkus.websockets.next.runtime.ClientConnectionManager;
import io.quarkus.websockets.next.runtime.Codecs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.quarkus.websockets.next;
package io.quarkus.websockets.next.deployment.config;

import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;

@ConfigMapping(prefix = "quarkus.websockets-next.server")
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
@ConfigRoot(phase = ConfigPhase.BUILD_TIME)
public interface WebSocketsServerBuildConfig {

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

import io.quarkus.arc.Arc;
import io.smallrye.common.annotation.CheckReturnValue;
import io.smallrye.common.annotation.Experimental;
import io.smallrye.mutiny.Uni;
import io.vertx.core.buffer.Buffer;

Expand Down Expand Up @@ -42,7 +41,6 @@
*
* @see WebSocketClientConnection
*/
@Experimental("This API is experimental and may change in the future")
public interface BasicWebSocketConnector {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;
import io.vertx.core.buffer.Buffer;

/**
*
* @see BinaryMessageCodec
*/
@Experimental("This API is experimental and may change in the future")
public class BinaryDecodeException extends WebSocketException {

private static final long serialVersionUID = 6814319993301938091L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

/**
*
* @see BinaryMessageCodec
*/
@Experimental("This API is experimental and may change in the future")
public class BinaryEncodeException extends WebSocketException {

private static final long serialVersionUID = -8042792962717461873L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;
import io.vertx.core.buffer.Buffer;

/**
Expand Down Expand Up @@ -28,7 +27,6 @@
* @param <T>
* @see OnBinaryMessage
*/
@Experimental("This API is experimental and may change in the future")
public interface BinaryMessageCodec<T> extends MessageCodec<T, Buffer> {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

/**
* WebSocket endpoints define the mode used to process incoming events for a specific connection.
* <p>
Expand All @@ -10,7 +8,6 @@
* @see WebSocketConnection
* @see WebSocketClientConnection
*/
@Experimental("This API is experimental and may change in the future")
public enum InboundProcessingMode {

/**
Expand All @@ -23,4 +20,4 @@ public enum InboundProcessingMode {
*/
CONCURRENT,

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.lang.reflect.Type;

import io.smallrye.common.annotation.Experimental;

/**
* Used to encode and decode messages.
*
Expand All @@ -12,7 +10,6 @@
* @see TextMessageCodec
* @see BinaryMessageCodec
*/
@Experimental("This API is experimental and may change in the future")
public interface MessageCodec<T, MESSAGE> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.smallrye.common.annotation.Experimental;

/**
* {@link WebSocket} and {@link WebSocketClient} endpoint methods annotated with this annotation consume binary messages. An
* endpoint may declare at most one method annotated with this annotation.
Expand Down Expand Up @@ -61,7 +59,6 @@
*/
@Retention(RUNTIME)
@Target(METHOD)
@Experimental("This API is experimental and may change in the future")
public @interface OnBinaryMessage {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.smallrye.common.annotation.Experimental;

/**
* {@link WebSocket} and {@link WebSocketClient} endpoint methods annotated with this annotation are invoked when a connection
* is closed. An endpoint may declare at most one method annotated with this annotation. The method must return {@code void} or
Expand Down Expand Up @@ -46,7 +44,6 @@
*/
@Retention(RUNTIME)
@Target(METHOD)
@Experimental("This API is experimental and may change in the future")
public @interface OnClose {

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.smallrye.common.annotation.Experimental;

/**
* {@link WebSocket} and {@link WebSocketClient} endpoint methods annotated with this annotation are invoked when an error
* occurs.
Expand Down Expand Up @@ -59,7 +57,6 @@
*/
@Retention(RUNTIME)
@Target(METHOD)
@Experimental("This API is experimental and may change in the future")
public @interface OnError {

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.smallrye.common.annotation.Experimental;

/**
* {@link WebSocket} and {@link WebSocketClient} endpoint methods annotated with this annotation are invoked when a new
* connection is opened. An endpoint may declare at most one method annotated with this annotation.
Expand Down Expand Up @@ -43,7 +41,6 @@
*/
@Retention(RUNTIME)
@Target(METHOD)
@Experimental("This API is experimental and may change in the future")
public @interface OnOpen {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.smallrye.common.annotation.Experimental;

/**
* {@link WebSocket} and {@link WebSocketClient} endpoint methods annotated with this annotation consume pong messages. An
* endpoint may declare at most one method annotated with this annotation.
Expand Down Expand Up @@ -45,7 +43,6 @@
*/
@Retention(RUNTIME)
@Target(METHOD)
@Experimental("This API is experimental and may change in the future")
public @interface OnPongMessage {

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import io.smallrye.common.annotation.Experimental;

/**
* {@link WebSocket} and {@link WebSocketClient} endpoint methods annotated with this annotation consume text messages. An
* endpoint may declare at most one method annotated with this annotation.
Expand Down Expand Up @@ -60,7 +58,6 @@
*/
@Retention(RUNTIME)
@Target(METHOD)
@Experimental("This API is experimental and may change in the future")
public @interface OnTextMessage {

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

import jakarta.enterprise.inject.Default;

import io.smallrye.common.annotation.Experimental;

/**
* Provides convenient access to all open client connections.
* <p>
* Quarkus provides a CDI bean with bean type {@link OpenClientConnections} and qualifier {@link Default}.
*/
@Experimental("This API is experimental and may change in the future")
public interface OpenClientConnections extends Iterable<WebSocketClientConnection> {

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

import jakarta.enterprise.inject.Default;

import io.smallrye.common.annotation.Experimental;

/**
* Provides convenient access to all open connections.
* <p>
* Quarkus provides a CDI bean with bean type {@link OpenConnections} and qualifier {@link Default}.
*/
@Experimental("This API is experimental and may change in the future")
public interface OpenConnections extends Iterable<WebSocketConnection> {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.CheckReturnValue;
import io.smallrye.common.annotation.Experimental;
import io.smallrye.mutiny.Uni;
import io.vertx.core.buffer.Buffer;

/**
* Sends messages to the connected WebSocket client/server.
*/
@Experimental("This API is experimental and may change in the future")
public interface Sender {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

/**
*
* @see TextMessageCodec
*/
@Experimental("This API is experimental and may change in the future")
public class TextDecodeException extends WebSocketException {

private static final long serialVersionUID = 6814319993301938091L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

/**
*
* @see TextMessageCodec
*/
@Experimental("This API is experimental and may change in the future")
public class TextEncodeException extends WebSocketException {

private static final long serialVersionUID = 837621296462089705L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

/**
* Used to encode and decode text messages.
*
Expand All @@ -27,7 +25,6 @@
* @param <T>
* @see OnTextMessage
*/
@Experimental("This API is experimental and may change in the future")
public interface TextMessageCodec<T> extends MessageCodec<T, String> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Singleton;

import io.smallrye.common.annotation.Experimental;

/**
* Denotes a WebSocket server endpoint.
* <p>
Expand All @@ -24,7 +22,6 @@
*/
@Retention(RUNTIME)
@Target(TYPE)
@Experimental("This API is experimental and may change in the future")
public @interface WebSocket {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Singleton;

import io.smallrye.common.annotation.Experimental;

/**
* Denotes a WebSocket client endpoint.
* <p>
Expand All @@ -24,7 +22,6 @@
*/
@Retention(RUNTIME)
@Target(TYPE)
@Experimental("This API is experimental and may change in the future")
public @interface WebSocketClient {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

/**
* This interface represents a client connection to a WebSocket endpoint.
* <p>
* Quarkus provides a CDI bean that implements this interface and can be injected in a {@link WebSocketClient}
* endpoint and used to interact with the connected server.
*/
@Experimental("This API is experimental and may change in the future")
public interface WebSocketClientConnection extends Connection {

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.quarkus.websockets.next;

import io.smallrye.common.annotation.Experimental;

@Experimental("This API is experimental and may change in the future")
public class WebSocketClientException extends WebSocketException {

private static final long serialVersionUID = -4213710383874397185L;
Expand Down
Loading

0 comments on commit cbd735f

Please sign in to comment.