diff --git a/akka-docs-dev/rst/java/code/docs/http/javadsl/HighLevelServerExample.java b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/HighLevelServerExample.java similarity index 98% rename from akka-docs-dev/rst/java/code/docs/http/javadsl/HighLevelServerExample.java rename to akka-docs-dev/rst/java/code/docs/http/javadsl/server/HighLevelServerExample.java index a72d99a21d..9b471fcaba 100644 --- a/akka-docs-dev/rst/java/code/docs/http/javadsl/HighLevelServerExample.java +++ b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/HighLevelServerExample.java @@ -2,7 +2,7 @@ * Copyright (C) 2009-2014 Typesafe Inc. */ -package docs.http.javadsl; +package docs.http.javadsl.server; //#high-level-server-example import akka.actor.ActorSystem; diff --git a/akka-docs-dev/rst/java/code/docs/http/javadsl/HttpServerExampleDocTest.java b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/HttpServerExampleDocTest.java similarity index 99% rename from akka-docs-dev/rst/java/code/docs/http/javadsl/HttpServerExampleDocTest.java rename to akka-docs-dev/rst/java/code/docs/http/javadsl/server/HttpServerExampleDocTest.java index 2aa115fdc2..6cbe9e9e0a 100644 --- a/akka-docs-dev/rst/java/code/docs/http/javadsl/HttpServerExampleDocTest.java +++ b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/HttpServerExampleDocTest.java @@ -2,7 +2,7 @@ * Copyright (C) 2009-2015 Typesafe Inc. */ -package docs.http.javadsl; +package docs.http.javadsl.server; import akka.actor.ActorSystem; import akka.http.impl.util.Util; diff --git a/akka-docs-dev/rst/java/code/docs/http/javadsl/PathDirectiveExampleTest.java b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/PathDirectiveExampleTest.java similarity index 98% rename from akka-docs-dev/rst/java/code/docs/http/javadsl/PathDirectiveExampleTest.java rename to akka-docs-dev/rst/java/code/docs/http/javadsl/server/PathDirectiveExampleTest.java index 0f1277d879..d77cafaa1c 100644 --- a/akka-docs-dev/rst/java/code/docs/http/javadsl/PathDirectiveExampleTest.java +++ b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/PathDirectiveExampleTest.java @@ -2,7 +2,7 @@ * Copyright (C) 2009-2015 Typesafe Inc. */ -package docs.http.javadsl; +package docs.http.javadsl.server; import akka.http.javadsl.model.HttpRequest; import akka.http.javadsl.model.StatusCodes; diff --git a/akka-docs-dev/rst/java/code/docs/http/javadsl/testkit/MyAppService.java b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/testkit/MyAppService.java similarity index 95% rename from akka-docs-dev/rst/java/code/docs/http/javadsl/testkit/MyAppService.java rename to akka-docs-dev/rst/java/code/docs/http/javadsl/server/testkit/MyAppService.java index 28621b9e3a..8f2bb068f5 100644 --- a/akka-docs-dev/rst/java/code/docs/http/javadsl/testkit/MyAppService.java +++ b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/testkit/MyAppService.java @@ -2,7 +2,7 @@ * Copyright (C) 2009-2015 Typesafe Inc. */ -package docs.http.javadsl.testkit; +package docs.http.javadsl.server.testkit; //#simple-app import akka.http.javadsl.server.*; diff --git a/akka-docs-dev/rst/java/code/docs/http/javadsl/testkit/TestkitExampleTest.java b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/testkit/TestkitExampleTest.java similarity index 96% rename from akka-docs-dev/rst/java/code/docs/http/javadsl/testkit/TestkitExampleTest.java rename to akka-docs-dev/rst/java/code/docs/http/javadsl/server/testkit/TestkitExampleTest.java index 6f97671ebc..bddd124a38 100644 --- a/akka-docs-dev/rst/java/code/docs/http/javadsl/testkit/TestkitExampleTest.java +++ b/akka-docs-dev/rst/java/code/docs/http/javadsl/server/testkit/TestkitExampleTest.java @@ -2,7 +2,7 @@ * Copyright (C) 2009-2015 Typesafe Inc. */ -package docs.http.javadsl.testkit; +package docs.http.javadsl.server.testkit; //#simple-app-testing import akka.http.javadsl.model.HttpRequest; diff --git a/akka-docs-dev/rst/java/http/routing-dsl/directives/path-directives.rst b/akka-docs-dev/rst/java/http/routing-dsl/directives/path-directives.rst index 1530003fae..126ab19a4f 100644 --- a/akka-docs-dev/rst/java/http/routing-dsl/directives/path-directives.rst +++ b/akka-docs-dev/rst/java/http/routing-dsl/directives/path-directives.rst @@ -91,5 +91,5 @@ Predefined path matchers allow extraction of various types of values: Here's a collection of path matching examples: -.. includecode:: ../../../code/docs/http/javadsl/PathDirectiveExampleTest.java +.. includecode:: ../../../code/docs/http/javadsl/server/PathDirectiveExampleTest.java :include: path-examples \ No newline at end of file diff --git a/akka-docs-dev/rst/java/http/routing-dsl/overview.rst b/akka-docs-dev/rst/java/http/routing-dsl/overview.rst index 529b2cddec..ccd9c6daca 100644 --- a/akka-docs-dev/rst/java/http/routing-dsl/overview.rst +++ b/akka-docs-dev/rst/java/http/routing-dsl/overview.rst @@ -7,7 +7,7 @@ The Akka HTTP :ref:`http-low-level-server-side-api-java` provides a ``Flow``- or an application to respond to incoming HTTP requests by simply mapping requests to responses (excerpt from :ref:`Low-level server side example `): -.. includecode:: ../../code/docs/http/javadsl/HttpServerExampleDocTest.java +.. includecode:: ../../code/docs/http/javadsl/server/HttpServerExampleDocTest.java :include: request-handler While it'd be perfectly possible to define a complete REST API service purely by inspecting the incoming @@ -21,7 +21,7 @@ async handler function) that can be directly supplied to a ``bind`` call. Here's the complete example rewritten using the composable high-level API: -.. includecode:: ../../code/docs/http/javadsl/HighLevelServerExample.java +.. includecode:: ../../code/docs/http/javadsl/server/HighLevelServerExample.java :include: high-level-server-example Heart of the high-level architecture is the route tree. It is a big expression of type ``Route`` diff --git a/akka-docs-dev/rst/java/http/routing-dsl/testkit.rst b/akka-docs-dev/rst/java/http/routing-dsl/testkit.rst index 36fce8c213..4eddb2a2f8 100644 --- a/akka-docs-dev/rst/java/http/routing-dsl/testkit.rst +++ b/akka-docs-dev/rst/java/http/routing-dsl/testkit.rst @@ -21,7 +21,7 @@ Example To see the testkit in action consider the following simple calculator app service: -.. includecode:: ../../code/docs/http/javadsl/testkit/MyAppService.java +.. includecode:: ../../code/docs/http/javadsl/server/testkit/MyAppService.java :include: simple-app The app extends from ``HttpApp`` which brings all of the directives into scope. Method ``createRoute`` @@ -29,7 +29,7 @@ needs to be implemented to return the complete route of the app. Here's how you would test that service: -.. includecode:: ../../code/docs/http/javadsl/testkit/TestkitExampleTest.java +.. includecode:: ../../code/docs/http/javadsl/server/testkit/TestkitExampleTest.java :include: simple-app-testing diff --git a/akka-docs-dev/rst/java/http/server-side/low-level-server-side-api.rst b/akka-docs-dev/rst/java/http/server-side/low-level-server-side-api.rst index 0be786d295..8ce8814d52 100644 --- a/akka-docs-dev/rst/java/http/server-side/low-level-server-side-api.rst +++ b/akka-docs-dev/rst/java/http/server-side/low-level-server-side-api.rst @@ -62,7 +62,7 @@ Starting and Stopping On the most basic level an Akka HTTP server is bound by invoking the ``bind`` method of the `akka.http.javadsl.Http`_ extension: -.. includecode:: ../../code/docs/http/javadsl/HttpServerExampleDocTest.java +.. includecode:: ../../code/docs/http/javadsl/server/HttpServerExampleDocTest.java :include: binding-example Arguments to the ``Http().bind`` method specify the interface and port to bind to and register interest in handling @@ -99,7 +99,7 @@ Requests are handled by calling one of the ``handleWithXXX`` methods with a hand Here is a complete example: -.. includecode:: ../../code/docs/http/javadsl/HttpServerExampleDocTest.java +.. includecode:: ../../code/docs/http/javadsl/server/HttpServerExampleDocTest.java :include: full-server-example In this example, a request is handled by transforming the request stream with a function ``Function``