From a451e93f2c005f4684e739cd0d6e0eb8d24aa7fd Mon Sep 17 00:00:00 2001 From: kirsten Date: Sat, 28 Dec 2024 18:13:45 +0000 Subject: [PATCH] docs updated, modules export added, Executors added to scale concurrent connections, Handled.java notification class added to single the request was already handled --- README.md | 18 +- docs/allclasses-index.html | 40 +- docs/allpackages-index.html | 8 +- docs/element-list | 1 + docs/help-doc.html | 17 +- docs/index-files/index-1.html | 6 +- docs/index-files/index-10.html | 6 +- docs/index-files/index-11.html | 16 +- docs/index-files/index-12.html | 10 +- docs/index-files/index-13.html | 26 +- docs/index-files/index-14.html | 8 +- docs/index-files/index-15.html | 18 +- docs/index-files/index-16.html | 28 +- docs/index-files/index-17.html | 12 +- docs/index-files/index-2.html | 10 +- docs/index-files/index-3.html | 6 +- docs/index-files/index-4.html | 18 +- docs/index-files/index-5.html | 16 +- docs/index-files/index-6.html | 46 +-- docs/index-files/index-7.html | 14 +- docs/index-files/index-8.html | 10 +- docs/index-files/index-9.html | 8 +- docs/index.html | 61 +-- docs/member-search-index.js | 2 +- docs/module-search-index.js | 2 +- docs/org.racore/module-summary.html | 95 +++++ docs/org.racore/org/racore/Endpoint.html | 348 ++++++++++++++++++ .../org/racore/EndpointHandler.html | 295 +++++++++++++++ docs/org.racore/org/racore/Handled.html | 148 ++++++++ docs/org.racore/org/racore/Interceptor.html | 156 ++++++++ .../org/racore/Main.LoggingInterceptor.html | 205 +++++++++++ docs/org.racore/org/racore/Main.Person.html | 239 ++++++++++++ docs/org.racore/org/racore/Main.html | 193 ++++++++++ docs/org.racore/org/racore/RaConfig.html | 175 +++++++++ docs/org.racore/org/racore/Request.html | 293 +++++++++++++++ .../org.racore/org/racore/ServerRegistry.html | 186 ++++++++++ .../org/racore/package-summary.html | 121 ++++++ docs/org.racore/org/racore/package-tree.html | 94 +++++ .../org/racore/utils/CustomRequest.html | 274 ++++++++++++++ .../org/racore/utils/FileUtils.html | 206 +++++++++++ .../org/racore/utils/FormDataExtractor.html | 175 +++++++++ .../utils/HttpExchangeRequestContext.html | 232 ++++++++++++ .../org/racore/utils/JsonUtils.html | 175 +++++++++ .../org/racore/utils/QueryParameterUtil.html | 175 +++++++++ .../org/racore/utils/package-summary.html | 113 ++++++ .../org/racore/utils/package-tree.html | 85 +++++ docs/overview-tree.html | 39 +- docs/package-search-index.js | 2 +- docs/search.html | 4 +- docs/type-search-index.js | 2 +- src/main/java/module-info.java | 8 + src/main/java/org/racore/Endpoint.java | 52 ++- src/main/java/org/racore/Handled.java | 6 + src/main/java/org/racore/ServerRegistry.java | 3 +- 54 files changed, 4271 insertions(+), 235 deletions(-) create mode 100644 docs/org.racore/module-summary.html create mode 100644 docs/org.racore/org/racore/Endpoint.html create mode 100644 docs/org.racore/org/racore/EndpointHandler.html create mode 100644 docs/org.racore/org/racore/Handled.html create mode 100644 docs/org.racore/org/racore/Interceptor.html create mode 100644 docs/org.racore/org/racore/Main.LoggingInterceptor.html create mode 100644 docs/org.racore/org/racore/Main.Person.html create mode 100644 docs/org.racore/org/racore/Main.html create mode 100644 docs/org.racore/org/racore/RaConfig.html create mode 100644 docs/org.racore/org/racore/Request.html create mode 100644 docs/org.racore/org/racore/ServerRegistry.html create mode 100644 docs/org.racore/org/racore/package-summary.html create mode 100644 docs/org.racore/org/racore/package-tree.html create mode 100644 docs/org.racore/org/racore/utils/CustomRequest.html create mode 100644 docs/org.racore/org/racore/utils/FileUtils.html create mode 100644 docs/org.racore/org/racore/utils/FormDataExtractor.html create mode 100644 docs/org.racore/org/racore/utils/HttpExchangeRequestContext.html create mode 100644 docs/org.racore/org/racore/utils/JsonUtils.html create mode 100644 docs/org.racore/org/racore/utils/QueryParameterUtil.html create mode 100644 docs/org.racore/org/racore/utils/package-summary.html create mode 100644 docs/org.racore/org/racore/utils/package-tree.html create mode 100644 src/main/java/module-info.java create mode 100644 src/main/java/org/racore/Handled.java diff --git a/README.md b/README.md index 0cb7640..c1db6b9 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,23 @@ This tutorial provides an overview of REST API endpoints using the Ra framework. --- -### Start a web server and return an object with a single line of Java +## Defining an Endpoint + +When using Ra, you can define an endpoint with the following syntax: + +```java +verb("/endpoint", request -> { + // Do something cool with the request + // For example, parse data into an object, access query parameters, path variables, files, or form data, etc. + + // Then return an object or a Path to a resource + return new MyObject(); +}); +``` + +--- + +### Start a web server, register an endpoint, and return a JSON response with a single line of Java ```java get("/getPerson/{id}", _ -> new Person("Alice", 30)); ``` diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index 50d48c8..a5aa800 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,7 +1,7 @@ - + All Classes and Interfaces @@ -26,7 +26,7 @@ diff --git a/docs/allpackages-index.html b/docs/allpackages-index.html index 30af27d..24071be 100644 --- a/docs/allpackages-index.html +++ b/docs/allpackages-index.html @@ -1,7 +1,7 @@ - + All Packages @@ -26,7 +26,7 @@