Skip to content

Commit

Permalink
[RESTEASY-1727] initial pass at documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rsearls authored and asoldano committed Oct 16, 2017
1 parent e1668de commit 06b20a6
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docbook/reference/en/en-US/master.xml
Expand Up @@ -56,6 +56,7 @@
<!ENTITY Validation SYSTEM "modules/Validation.xml">
<!ENTITY CORS SYSTEM "modules/cors.xml">
<!ENTITY I18N SYSTEM "modules/I18N.xml">
<!ENTITY JAX-RS_2.1_additions SYSTEM "modules/JAX-RS_2.1_additions.xml">
<!ENTITY Deprecated_security_modules SYSTEM "modules/Deprecated_security_modules.xml">
]>

Expand Down Expand Up @@ -152,6 +153,7 @@ This one is short
&Deprecated_security_modules;
&Migration_to_3_1;
&Migration_from_older_versions;
&JAX-RS_2.1_additions;
&Books;
</book>

66 changes: 66 additions & 0 deletions docbook/reference/en/en-US/modules/JAX-RS_2.1_additions.xml
@@ -0,0 +1,66 @@
<chapter id="JAX-RS_2.1_additions">
<title>JAX-RS 2.1 Additions</title>
<para>JAX-RS 2.1 adds more asynchronous processing support in both the
Client and the Server API. The specification adds a Reactive programming
style to the Client side and Server-Sent Events (SSE) protocol support to
both client and server.
</para>

<sect1>
<title>Rective Clients API</title>
<para>The specification defines a new type of invoker named RxInvoker, and a default
implementation of this type named CompletionStageRxInvoker.
CompletionStageRxInvoker implements Java 8's interface CompletionStage.
This interface declares a large number of methods dedicated to managing
asynchronous computations.
</para>
<para>There is also a new rx method which is used in a similar manner to async.
</para>
</sect1>

<sect1>
<title>Server-Sent Events (SSE)</title>
<para>Server-sent events provides a way to establish a one-way channel from a server
to a client. The connection is long running and it is re-used for multiple events
sent from the server.
</para>
<sect2>
<title>SSE Client API</title>
<para>
The SSE entry point in the client API is the SseEventSource class.
This object is constructed from a WebTarget.
It does not duplicate any functionality in WebTarget.
It only adds the necessary logic for SSE.
</para>
<para>
Clients request an SSE connection by using the special media type
<emphasis>text/event-stream</emphasis>
in the Accept header.
</para>
</sect2>
<sect2>
<title>SSE Server API</title>
<para>
The SSE server API is used to accept connections and send events to one or more clients.
A resource method that injects an SseEventSink and produces the media type
<emphasis>text/event-stream</emphasis>
is an SSE resource method.
</para>
</sect2>
<sect2>
<title>Broadcasting</title>
<para>
SSE provides a way to broadcast events to multiple clients simultaneously.
Multiple SseEventSink’s can be registered on a single SseBroadcaster object.
</para>
</sect2>
</sect1>
<sect1>
<title>Java API for JSON Binding</title>
<para>
RESTEasy supports both JSON-B and JSON-P. In accordance with the specification,
entity providers for JSON-B take precedence over those for JSON-P for all types
except JsonValue and its sub-types.
</para>
</sect1>
</chapter>

0 comments on commit 06b20a6

Please sign in to comment.