Skip to content

Commit

Permalink
Merge pull request #41193 from michalvavrik/feature/ws-next-cdi-event…
Browse files Browse the repository at this point in the history
…s-docs-typo

Fix WebSockets NEXT CDI events documentation as observed events qualifiers does not exist in the final version
  • Loading branch information
mkouba authored Jun 14, 2024
2 parents fa5f801 + 2104846 commit 59bad99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/main/asciidoc/websockets-next-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -523,18 +523,18 @@ For example, `OpenConnections#findByEndpointId(String)` makes it easy to find co

=== CDI events

Quarkus fires a CDI event of type `io.quarkus.websockets.next.WebSocketConnection` with qualifier `@io.quarkus.websockets.next.ConnectionOpen` asynchronously when a new connection is opened.
Moreover, a CDI event of type `WebSocketConnection` with qualifier `@io.quarkus.websockets.next.ConnectionClosed` is fired asynchronously when a connection is closed.
Quarkus fires a CDI event of type `io.quarkus.websockets.next.WebSocketConnection` with qualifier `@io.quarkus.websockets.next.Open` asynchronously when a new connection is opened.
Moreover, a CDI event of type `WebSocketConnection` with qualifier `@io.quarkus.websockets.next.Closed` is fired asynchronously when a connection is closed.

[source, java]
----
import jakarta.enterprise.event.ObservesAsync;
import io.quarkus.websockets.next.ConnectionOpen;
import io.quarkus.websockets.next.Open;
import io.quarkus.websockets.next.WebSocketConnection;
class MyBean {
void connectionOpened(@ObservesAsync @ConnectionOpen WebSocketConnection connection) { <1>
void connectionOpened(@ObservesAsync @Open WebSocketConnection connection) { <1>
// This observer method is called when a connection is opened...
}
}
Expand Down

0 comments on commit 59bad99

Please sign in to comment.