+htc #18027 add the missing javadsl.clientLayer and serverLayer
This commit is contained in:
parent
e14773c3d9
commit
8ef7c64886
7 changed files with 110 additions and 10 deletions
|
|
@ -62,7 +62,19 @@ as a more general purpose streaming infrastructure feature.
|
|||
However, akka-stream should soon provide such a feature.
|
||||
|
||||
|
||||
.. _http-client-layer-java:
|
||||
|
||||
Stand-Alone HTTP Layer Usage
|
||||
----------------------------
|
||||
|
||||
// TODO
|
||||
Due to its Reactive-Streams-based nature the Akka HTTP layer is fully detachable from the underlying TCP
|
||||
interface. While in most applications this "feature" will not be crucial it can be useful in certain cases to be able
|
||||
to "run" the HTTP layer (and, potentially, higher-layers) against data that do not come from the network but rather
|
||||
some other source. Potential scenarios where this might be useful include tests, debugging or low-level event-sourcing
|
||||
(e.g by replaying network traffic).
|
||||
|
||||
On the client-side the stand-alone HTTP layer forms a ``BidiFlow<HttpRequest, SslTlsOutbound, SslTlsInbound, HttpResponse, BoxedUnit>``,
|
||||
that is a stage that "upgrades" a potentially encrypted raw connection to the HTTP level.
|
||||
|
||||
You create an instance of the layer by calling one of the two overloads of the ``Http.get(system).clientLayer`` method,
|
||||
which also allows for varying degrees of configuration.
|
||||
|
|
@ -154,7 +154,15 @@ If defined encryption is enabled on all accepted connections. Otherwise it is di
|
|||
Stand-Alone HTTP Layer Usage
|
||||
----------------------------
|
||||
|
||||
It is currently only possible to use the HTTP server layer with Scala in a stand-alone fashion.
|
||||
See :ref:`http-server-layer-scala` and `#18027`_ for the plan to add Java support.
|
||||
Due to its Reactive-Streams-based nature the Akka HTTP layer is fully detachable from the underlying TCP
|
||||
interface. While in most applications this "feature" will not be crucial it can be useful in certain cases to be able
|
||||
to "run" the HTTP layer (and, potentially, higher-layers) against data that do not come from the network but rather
|
||||
some other source. Potential scenarios where this might be useful include tests, debugging or low-level event-sourcing
|
||||
(e.g by replaying network traffic).
|
||||
|
||||
.. _`#18027`: https://github.com/akka/akka/issues/18027
|
||||
On the server-side the stand-alone HTTP layer forms a ``BidiFlow<HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, BoxedUnit>``,
|
||||
that is a stage that "upgrades" a potentially encrypted raw connection to the HTTP level.
|
||||
|
||||
You create an instance of the layer by calling one of the two overloads of the ``Http.get(system).serverLayer`` method,
|
||||
which also allows for varying degrees of configuration. Note, that the returned instance is not reusable and can only
|
||||
be materialized once.
|
||||
Loading…
Add table
Add a link
Reference in a new issue