Commit graph

74 commits

Author SHA1 Message Date
Hawstein
f98c1946d8 +doc #20466 example snippet for akka http java dsl: BasicDirectives (#20647) 2016-06-03 13:43:42 +02:00
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +02:00
Jan Ypma
6a13d99bfc =htp #20610 Fix Java RouteTest to not depend on scala DSL in API (#20615) 2016-05-30 21:59:54 +02:00
Johan Andrén
acb71ac4e5 !htp Move classes from javadsl to javadsl.server to keep in release jars #20556 (#20558) 2016-05-19 11:30:59 +02:00
Johan Andrén
29029be31d !htp #18919 #19519 New JavaDSL for Akka HTTP (#20518)
* !htt #18919 #19519 Align Java HTTP server DSL with Scala

This commits replaces the Java HTTP server DSL with a Java-8 centric one
which exposes all scala DSL concepts to be usable from Java, including
custom directives, (un)marshallers, rejections, headers, and type safety
for path and query parameters.

* Add RequestContext and RouteResult to Java DSL
fix websockets
WIP bring java docs up to date.
This applies some updates to the root-level documentation

* [htp] Fix java documentation to correctly mention timeouts

Timeouts are configured the same in Java and Scala. Hence, linking to the
scala docs for timeouts from Java.

* =htc fix optionalHeaderValueByType in Java

* =htt #20200 fix java testkit always using NoLogging instead logger

* +htt actually run new javadsl tests, allow overriding config

* =htt improve javadsl test infra with more details when fails

* =htt fix bug in wrong path matcher exposed

* +htp add missing remaining path matcher

* =htp Java DSL cookie tests fixed

* =htt Java DSL ParameterDirectivesTest fixed

Protect the tweets from scalariform

Incorrect response expectations in cache condition directives spec fixed

* =htt Path directives for Java DSL

* +!htt PathMatchers rewritten, made uniform and tests passing

* Bugfix in java reject and a little test-boyscouting

* Revert "Incorrect response expectations in cache condition directives spec fixed"

This reverts commit cd50e89d45db010309f8249b090ea654ebb11c7a.

* +htc HttpAPIsTest is compile time only, not for running
Also, moved from the client package since not strictly a client test.

SecurityDirectives passing

Two faulty tests and two actual bugs.

Fix for cache condition spec not working

* Not sending in Unit instad of the implicit magnet in the test
* HeaderMagnet now works as expected
* Java API added for - and + on DateTime

PetStore example and test fixed

* Annotations to make marshalling work without default constructor
* Made model class immutable

Incorrect tests fixed

Some scaladoc boyscouting as bonus

* =htt RequestValTest sprinkled out across multiple directive tests

Client ip extraction test with incorrect header name fixed.

* =htt Incorrect CodingDirectivesTest fixed.

* =htt Bugfix for Java Unmarshaller.firstOf and fixes to JavaRouteTest

* =htt MarshallerTest fixed

* Missing seal signature added to JavaDSL
* More consistent (with Scala) test kit setup for Java
* missing Javadocs added
* Thread.sleep in default exception handler removed

* =htt copy directive docs, prepare for finishing it up

* +htt SecurityDirectives.authorize variants and test coverage added

* +htt Custom headers in Java DSL

* =htt WIP on java docs

* +htp add missing parameterOrDefault directive
Fixed a lot of doc warnings

* =htc intense progress on javadsl docs

* =htc #20470 Link to issue about docs and fix compile error
compile, migration guide
don't mima check http-experimental

* =htt Java DSL doc warnings fixed.
Only `Could not lex literal_block` ones left now

* =htc fix mima settings

* =doc fix MethodDirectives doc test with custom method

* =htc fix coding directives spec after bad merge

* =htc fix concat being corresponding to route() in javadsl

* =htt Disable consistency check for route/concat as it fails only on ci server

* !htt Minor fixes to PathMatchers
2016-05-16 10:38:40 +02:00
poojadshende
6edf2e6238 Updated for outProbe 2016-05-06 17:57:36 -07:00
Patrik Nordwall
137c4c8b3d fix the the typo 2016-03-18 17:06:34 +01:00
Konrad Malawski
a253014ef4 =htp #19397,#19842 fix content negotiation for non 2xx and Accept handling 2016-03-15 09:40:58 +01:00
Konrad Malawski
4d9ffd6387 Merge pull request #20000 from wlk/wlk-18500-fix-scaladoc-warnings-from-jenkins
[WIP] fixing scaladoc warnings reported by jenkins
2016-03-11 15:11:31 +01:00
Wojciech Langiewicz
afce1b7529 fixing scaladoc warnings reported by jenkins 2016-03-10 13:05:32 +01:00
Martynas Mickevičius
50f99328fe #18765 Update to latest MiMa which is now an AutoPlugin.
* check for binary inc. issues by default
* if check is not needed, disable MimaPlugin
* determine old artifact id from the current one
2016-03-10 10:45:35 +02:00
Johannes Rudolph
b6cbc7f13a =all remove unused imports 2016-02-23 20:29:22 +01:00
Johan Andrén
62e30b3c08 Update copyrights and links to the new company name #19851 2016-02-23 12:58:39 +01:00
Roland Kuhn
e202ea8c40 clean up dependencies #19755 and other fixes
* remove inter-project dependencies between streamTestkit -> peristence -> remote
* make PartitionOutOfBoundsException extend IndexOutOfBoundsException
* some weird formatting
* remove -experimental from HTTP Testkit/Tests
* split out shared LevelDb journal tests into new subproject (not to be
  published)
2016-02-15 20:35:37 +01:00
lolski
21381d5710 =str #19293 fix issues in Sink.seq + minor doc fixes + use Sink.seq and limit in tests where appropriate
* Sink.seq (Scala DSL) now returns immutable.Seq rather than Seq
* Sink.seq will not silently truncate when incoming elements is > Int.MAX_VALUE
* minor doc fixes
* replacing various grouped(n) / Sink.head with limit(n) / Sink.seq in various tests
* fix inconsistent indentation in RequestParserSpec
2016-02-12 01:36:21 +08:00
Johan Andrén
61b375cec8 !htt #19514 Update RouterSettings to be non case class 2016-01-25 17:09:03 +01:00
Konrad Malawski
379a3a85b4 !htc #19514 add withXYZ methods to all configs 2016-01-25 15:30:59 +01:00
Prayag Verma
b7783968a0 =pro #19068 All copyrights ranges and single years updated to a range ending in 2016 2016-01-25 10:20:30 +01:00
Roland Kuhn
4c72495581 #19440 replace Scala Future usage with CompletionStage in javadsl
This entails:

  * adding akka.pattern.PatternCS.* to enable ask etc. with
    CompletionStage
  * changing RequestContext to offer an ExecutionContextExecutor for the
    CompletionStage.*Async combinators
  * splitting up akka.stream.Queue for JavaDSL consistency
2016-01-23 18:00:11 +01:00
Konrad Malawski
1b47fbeac7 !htc,doc,htp #19508 fix casing of WebSocket (as per spec) 2016-01-22 11:12:22 +01:00
Roland Kuhn
e5baba2b29 squash some warnings 2016-01-20 11:54:24 +01:00
Roland Kuhn
3140e72265 #19046 replace system.{shutdown => terminate} 2016-01-20 11:50:43 +01:00
Endre Sándor Varga
60497f6561 also fix FlowInterleaveSpec
Also-by: Johan Andrén <johan@markatta.com>
Also-by: Roland Kuhn <rk@rkuhn.info>
Also-by: Martynas Mickevičius <mmartynas@gmail.com>
2016-01-20 10:01:58 +02:00
Martynas Mickevičius
8c1350b0d4 Merge pull request #19505 from 2m/wip-stream-build-fix
Various streams build improvements
2016-01-19 11:17:11 +02:00
Martynas Mickevičius
7743aa9d0a Various streams build improvements
* remove settings duplication between AkkaBuild and project specific .sbt files
* do not publish test projects
* run akka-http-core tests
* fix lambda sample project versions
* remove obsolete projects (streamAndHttp, httpParent, docsDev)
* exclude parsing project from unidoc
* update to the latest sbt
2016-01-18 18:16:30 +02:00
Roland Kuhn
ab117c9e56 #19427 do not require Flow in UpgradeToWebsocket 2016-01-17 17:19:36 +01:00
Konrad Malawski
f6147972d7 +pro add Akka Streams HTTP to master build
> merged akka-bench-jmh-dev with akka-bench-jmh
> renamed akka-stream-tck to more correctly named akka-stream-tests-tck
> merged java8 tests with normal tests in http
2016-01-13 01:25:04 +01:00
Mathias
902bcbaa10 !htc restructure HttpEntity model on the Java side for consistency in modelling approach 2015-12-17 23:02:07 +01:00
Martynas Mickevičius
e6e476d82a =str #19128 #19127 rename Source/Sink factory apply overloads 2015-12-17 11:48:30 +02:00
Roland Kuhn
1500d1f36d !str #19005 make groupBy et al return a SubFlow
A SubFlow (or SubSource) is not a Graph, it is an unfinished builder
that accepts transformations. This allows us to capture the substreams’
transformations before materializing the flow, which will be very
helpful in fully fusing all operators.

Another change is that groupBy now requires a maxSubstreams parameter in
order to bound its resource usage. In exchange the matching merge can be
unbounded. This trades silent deadlock for explicit stream failure.

This commit also changes all uses of Predef.identity to use `conforms`
and removes the HTTP impl.util.identityFunc.
2015-12-10 12:27:16 +01:00
Mathias
3520d7e827 =htk fix potential test failure obfuscation 2015-12-04 13:32:01 +01:00
Konrad Malawski
8650d0c473 +str #18906 add Sink.headOption 2015-11-14 16:36:09 +01:00
Konrad Malawski
985e3b1c2f =str #18902 in tests (due to grouped+Sink.head) empty response stream would throw 2015-11-10 13:52:33 +01:00
Johan Andrén
19c8e557ba =htp #18661 effectiveUri in Java testkit
Java testkit now uses effectiveUri to behave just like the Scala testkit so that
the host header and path is joined. This allows for test calls that use just a relative
URI.
2015-10-24 13:47:25 +02:00
Viktor Klang
f29d7affbd !str #18692 javadsl.FlowGraph.Builder.add()
* also make factories more consistent by only offering
  FlowGraph.create()
* also remove secondary (edge-based) FlowGraph.Builder DSL
* also improve naming for conversions from Graph to
  Source/Flow/BidiFlow/Sink
2015-10-22 19:10:00 +02:00
Roland Kuhn
68ba0643d6 =str,htp clean up build warnings
- explicitly provide Unit values and place parens around tuple creation
- remove structural type usage in TestUtils
- fix Java double-casts
- use unused Java values by asserting their non-nullness
- work around inability to place case class in trait (scripted test)

The remaining warnings about using private types in public methods are
bogus as reported in https://issues.scala-lang.org/browse/SI-9490.
2015-09-25 15:20:23 +02:00
Johannes Rudolph
12edec7073 +htk #17914 add nicer Websocket route testing support 2015-08-26 13:39:20 +02:00
Johannes Rudolph
44ed8afd49 !htk change return type of TestResponse.fail to Unit to avoid surprises for Java implementors 2015-08-13 10:14:12 +02:00
Johannes Rudolph
e22118acd7 !htp simplify implicit resolution by getting rid of RoutingSetup 2015-07-24 17:08:54 +02:00
Johannes Rudolph
3b7d308545 !htp,jso,xml #18064 remove implicit parameters of Unmarshaller instances 2015-07-24 10:11:56 +02:00
Johannes Rudolph
4fe85b8b56 +htk add RouteTest.testAppRoute 2015-07-17 16:11:03 +02:00
Johannes Rudolph
4c24b72b31 +doc add Java testkit documentation and scaladoc 2015-07-17 16:03:18 +02:00
Konrad Malawski
569c0bf079 !htp #17965 more consistent and 22-ified javadsl handleWith 2015-07-15 11:31:18 +02:00
Johannes Rudolph
83833ae4f8 =htj #16436 add missing Java directives 2015-06-24 12:03:02 +02:00
Johannes Rudolph
10ea40b2f8 !htj move RequestVal classes to javadsl.server.values 2015-06-24 11:59:19 +02:00
Endre Sándor Varga
7879a5521b Rename FlowMaterializer to Materializer 2015-06-23 18:47:28 +02:00
Endre Sándor Varga
be82e85ffc +str #17361: Unified http java/scala projects except marshallers 2015-05-22 13:51:34 +02:00
Mathias
5859c39f8b =ht* #17279 rename akka-http-* modules where agreed 2015-04-24 18:44:24 +02:00
Patrik Nordwall
3dc4e6d077 !str #16992 Rework Source and Sink name parameter
* Remove name parameter (no overloads), naming is performed using `.withAttributes` or the new
  convenience `.named`. Those adds the OperationAttribute.Name and also change the name of the
  shape Inlet and Outlet.

* Remove Source/Sink parameter list for 0 parameter methods,
  this allows usage of `Sink.head` instead of `Sink.head()`
2015-03-06 09:24:00 +01:00
Mathias
ef208bfa8b =htp #16934 s/ActorFlowMaterializer/FlowMaterializer where possible, smaller cleanups 2015-03-02 13:52:09 +01:00