Skip to content

Commit 5d63cf1

Browse files
committed
docs(clients/java): replace ASCII-art Architecture with a real table
ASCII diagrams collapse on narrow viewports and don't style — replaced the four-layer box drawing with a markdown table that Starlight renders properly on every device, and added a one-sentence lead-in that names the stacking convention (top row calls into the bottom row via the codec + transport planes).
1 parent 254d609 commit 5d63cf1

1 file changed

Lines changed: 8 additions & 15 deletions

File tree

  • docs/src/content/docs/clients

docs/src/content/docs/clients/java.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,14 @@ var socket = client.create(options)
148148

149149
## Architecture
150150

151-
```
152-
+--------------------------------------------------+
153-
| Your Application |
154-
+--------------------------------------------------+
155-
| Socket API | Encoder/Decoder Pipeline |
156-
| .on() | fire(POJO) -> encode -> send |
157-
| .fire() | receive -> decode -> on(MESSAGE) |
158-
| .close() | |
159-
+--------------------------------------------------+
160-
| Transport Layer (auto-fallback) |
161-
| WebSocket | SSE | Streaming | Long-Poll | gRPC |
162-
+--------------------------------------------------+
163-
| java.net.http (JDK 21+) | grpc-java (optional) |
164-
+--------------------------------------------------+
165-
```
151+
wAsync stacks four layers on top of the JDK's own HTTP client. Each row below is a horizontal plane in the client; a call to `.fire()` travels top-down through the codec and transport layers and lands on a JDK socket.
152+
153+
| Layer | Surface | What it does |
154+
|-------|---------|--------------|
155+
| **Your application** | Spring / Quarkus / plain Java | Business code that calls into the `Socket` API |
156+
| **Socket API + codec pipeline** | `.on(...)`, `.fire(...)`, `.close()`; `Encoder` / `Decoder` | Outbound: `fire(POJO) → encode → send`. Inbound: `receive → decode → on(MESSAGE)`. Type-safe, pluggable per transport. |
157+
| **Transport layer (auto-fallback)** | `Request.Builder.transport(...)` | `WEBSOCKET``SSE``STREAMING``LONG_POLLING``GRPC`. Picks the first one the server accepts; falls back automatically on failure. |
158+
| **Network backend** | `java.net.http.HttpClient` + `grpc-java` (optional) | JDK-native HTTP/2 + WebSocket via `java.net.http` (JDK 21+); bidirectional streaming over HTTP/2 via `grpc-java` when `atmosphere-grpc` is on the classpath. |
166159

167160
## Samples
168161

0 commit comments

Comments
 (0)