Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,17 @@ Changes log
response. A Host header set by the SDK is kept. Request timeouts, which cover the
response head, and thread interruption abort the request. Event streams are not
supported.
- Added the experimental Smithy server artifact (`org.restlet.ext.smithy.server`), whose
`SmithyServerAdapter` joins the `org.restlet.ext.smithy` package, hosting
smithy-java 1.8.0 services, generated or built from a model, behind a Restlet router
beside other routes. The SDK protocols resolve, validate and serialize each call, and its
handlers run on the request thread. Request bodies, concurrent calls and call durations
are bounded; deadlines, client disconnects and stopping interrupt the operation. It runs
on the class path only, as smithy-java's server modules split a package, with
`org.restlet.ext.smithy` on the class path too.
- Added experimental smithy-java 1.8.0 server hosting to the Smithy extension. Its
`SmithyServerAdapter` hosts services, generated or built from a model, behind a Restlet
router beside other routes, and its `SmithyServerBuilder`, which `Server.builder()`
finds under the name `restlet`, or alone when the SDK's Netty server is absent, listens
on Restlet HTTP/1.1 and HTTP/2 server connectors. The SDK protocols, such as restJson1 and RPCv2
CBOR, resolve, validate and serialize each call, and its handlers run on the request
thread. Request bodies, concurrent calls and call durations are bounded; deadlines,
client disconnects and stopping interrupt the operation. As smithy-java's server
modules split a package, its optional `server-core` dependency stays on the class path:
named modules read it with `--add-reads org.restlet.ext.smithy=ALL-UNNAMED`, and the
builder is only discovered on the class path.
- Added the supported `org.restlet.util.StreamTransport` seam for protocol-neutral,
bounded synchronous byte I/O, serialized writes, borrowed-stream cancellation and
owned subprocess lifecycle with separate bounded stderr capture. No protocol
Expand Down
156 changes: 0 additions & 156 deletions org.restlet.ext.smithy.server/pom.xml

This file was deleted.

11 changes: 0 additions & 11 deletions org.restlet.ext.smithy.server/src/test/smithy/smithy-build.json

This file was deleted.

55 changes: 50 additions & 5 deletions org.restlet.ext.smithy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<artifactId>org.restlet.ext.smithy</artifactId>
<name>Restlet Framework - Smithy extension</name>
<description>smithy-java client transport on Restlet HTTP client connectors.</description>
<description>smithy-java client transport and server host on Restlet HTTP connectors.</description>
<dependencies>
<dependency>
<groupId>org.restlet</groupId>
Expand All @@ -23,6 +23,16 @@
<artifactId>client-http</artifactId>
<version>${lib-smithy-java-version}</version>
</dependency>
<!-- Optional, for the server only. Its API is @SmithyUnstableApi in 1.8.0, and it splits
package software.amazon.smithy.java.server with server-api, so it stays on the class
path, out of the module graph. Applications add the protocol modules they serve, such
as aws-server-restjson or server-rpcv2-cbor. -->
<dependency>
<groupId>software.amazon.smithy.java</groupId>
<artifactId>server-core</artifactId>
<version>${lib-smithy-java-version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>software.amazon.smithy.java</groupId>
<artifactId>dynamic-client</artifactId>
Expand All @@ -41,13 +51,25 @@
<version>${lib-smithy-java-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.smithy.java</groupId>
<artifactId>aws-server-restjson</artifactId>
<version>${lib-smithy-java-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.smithy.java</groupId>
<artifactId>server-rpcv2-cbor</artifactId>
<version>${lib-smithy-java-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.smithy.java</groupId>
<artifactId>aws-sigv4</artifactId>
<version>${lib-smithy-java-version}</version>
<scope>test</scope>
</dependency>
<!-- Generate the client of src/test/smithy, see below. -->
<!-- Generate the clients and services of src/test/smithy, see below. -->
<dependency>
<groupId>software.amazon.smithy.java</groupId>
<artifactId>codegen-plugin</artifactId>
Expand Down Expand Up @@ -83,17 +105,38 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<!-- The server classes read the SDK server on the class path. -->
<compilerArgs combine.children="append">
<arg>--add-reads</arg>
<arg>org.restlet.ext.smithy=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<configuration>
<!-- Generated exceptions have no serialVersionUID. -->
<!-- Generated exceptions have no serialVersionUID, and generated
services overload each operation for sync and async handlers. -->
<compilerArgs combine.children="append">
<arg>-Xlint:-serial</arg>
<arg>-Xlint:-serial,-overloads</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
<!-- Like the compiler, Javadoc reads the SDK server on the class path. -->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalOptions>
<additionalOption>--add-reads</additionalOption>
<additionalOption>org.restlet.ext.smithy=ALL-UNNAMED</additionalOption>
</additionalOptions>
</configuration>
</plugin>
<!-- Generates SDK code from src/test/smithy with smithy-java, for the tests. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down Expand Up @@ -138,7 +181,9 @@
</goals>
<configuration>
<sources>
<source>${smithy.output}/source/java-codegen/java</source>
<source>${smithy.output}/greeter/java-codegen/java</source>
<source>${smithy.output}/notes/java-codegen/java</source>
<source>${smithy.output}/counter/java-codegen/java</source>
</sources>
</configuration>
</execution>
Expand Down
5 changes: 5 additions & 0 deletions org.restlet.ext.smithy/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
*
* <p>Restlet is a registered trademark of QlikTech International AB.
*/
/*
* The server classes use the smithy-java server, which splits a package in 1.8.0
* (smithy-java#1437) and can't be required: they read it on the class path, with --add-reads
* org.restlet.ext.smithy=ALL-UNNAMED, and its provider is only declared in META-INF/services.
*/
@SuppressWarnings({"requires-automatic", "requires-transitive-automatic"})
module org.restlet.ext.smithy {
requires transitive org.restlet;
Expand Down
Loading
Loading