New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java side documentation progress #17965

Merged
merged 8 commits into from Jul 14, 2015

Conversation

Projects
None yet
4 participants
@jrudolph
Member

jrudolph commented Jul 10, 2015

Here's the somewhat self-contained set of finished documentation. I'm going to extend it with more examples and detail over the next days until the cut.

/cc @sirthias

@akka-ci akka-ci added validating tested and removed validating labels Jul 10, 2015

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Jul 10, 2015

Collaborator

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3186/

Collaborator

akka-ci commented Jul 10, 2015

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3186/

@akka-ci akka-ci added validating and removed tested labels Jul 13, 2015

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph Jul 13, 2015

Member

Added a commit detailing the Route => Flow conversion on the Scala side. Would that have helped you @fommil?

Member

jrudolph commented Jul 13, 2015

Added a commit detailing the Route => Flow conversion on the Scala side. Would that have helped you @fommil?

@akka-ci akka-ci added the validating label Jul 13, 2015

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph Jul 13, 2015

Member

(I slightly updated the footnote.)

Member

jrudolph commented Jul 13, 2015

(I slightly updated the footnote.)

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Jul 13, 2015

Contributor

yes, that would have saved me several hours of frustration yesterday 😄

Contributor

fommil commented Jul 13, 2015

yes, that would have saved me several hours of frustration yesterday 😄

It is an error if the provided source doesn't produce exactly as many bytes as specified.
On the wire, a ``Strict`` entity and a ``Default`` entity cannot be distinguished.
The distinction of ``Strict`` and ``Default`` is an API-only one. One the wire, both kinds of entities look the same.

This comment has been minimized.

@ktoso

ktoso Jul 13, 2015

Member

nice rewording

@ktoso

ktoso Jul 13, 2015

Member

nice rewording

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Jul 13, 2015

Member

LGTM, looks good :-)

Member

ktoso commented Jul 13, 2015

LGTM, looks good :-)

@akka-ci akka-ci added tested and removed validating labels Jul 13, 2015

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Jul 13, 2015

Collaborator

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3190/

Collaborator

akka-ci commented Jul 13, 2015

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3190/

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Jul 13, 2015

Collaborator

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3191/

Collaborator

akka-ci commented Jul 13, 2015

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3191/

@akka-ci akka-ci added the tested label Jul 13, 2015

@jrudolph

This comment has been minimized.

Show comment
Hide comment
@jrudolph

jrudolph Jul 13, 2015

Member

Added a chapter about "handlers" on the java-side.

Member

jrudolph commented Jul 13, 2015

Added a chapter about "handlers" on the java-side.

@akka-ci

This comment has been minimized.

Show comment
Hide comment
@akka-ci

akka-ci Jul 13, 2015

Collaborator

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3194/

Collaborator

akka-ci commented Jul 13, 2015

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/3194/

@akka-ci akka-ci removed the tested label Jul 13, 2015

//#simple-handler-example-full
class TestHandler extends akka.http.javadsl.server.AllDirectives {
//#simple-handler
Handler handler = new Handler() {

This comment has been minimized.

@ktoso

ktoso Jul 13, 2015

Member

btw, since we now have Functions generated for japi in 2.3.x (I think since 2.3.11?), and bumped the streams dependency, wouldn't it make sense to drop Handler and use those akka.japi.function.FunctionN interfaces?

@ktoso

ktoso Jul 13, 2015

Member

btw, since we now have Functions generated for japi in 2.3.x (I think since 2.3.11?), and bumped the streams dependency, wouldn't it make sense to drop Handler and use those akka.japi.function.FunctionN interfaces?

This comment has been minimized.

@jrudolph

jrudolph Jul 13, 2015

Member

Wouldn't that be an argument for all SAM classes? I think it somewhat makes sense when the parameters are fixed to provide at least an alias. We could change the classes to extend from the matching FunctionX interfaces, though, and change the handleWith signatures to take matching FunctionN, instead. WDYT?

@jrudolph

jrudolph Jul 13, 2015

Member

Wouldn't that be an argument for all SAM classes? I think it somewhat makes sense when the parameters are fixed to provide at least an alias. We could change the classes to extend from the matching FunctionX interfaces, though, and change the handleWith signatures to take matching FunctionN, instead. WDYT?

This comment has been minimized.

@ktoso

ktoso Jul 13, 2015

Member

Yeah, for many SAM interfaces now we could move to akka.japi.function since we have them (we did not previously have them for so many params).

I thought of this direction ktoso@8784c18#diff-58791b179be1c95f3090b06bb72bf473R1 but then we need to name then handleWithN since javac is not-very-good-with-overloads: https://gist.github.com/ktoso/76248c629bd614c81624

If we change then to extend the matching function interfaces and have function in method params as well, why keep the Handler2? If users want to they can make their Handler, and if we don't require a type in APIs, let's not have it.

Maybe I'm overthinking, but I feel that the API proposed in the above commit I linked "looks more like akka streams", so maybe javadsl users would be more familiar with it... The handleWith## uglieness is a cost though :~

Do you have an opinion on this @rkuhn @viktorklang (using Roland while it's still monday ;-))

@ktoso

ktoso Jul 13, 2015

Member

Yeah, for many SAM interfaces now we could move to akka.japi.function since we have them (we did not previously have them for so many params).

I thought of this direction ktoso@8784c18#diff-58791b179be1c95f3090b06bb72bf473R1 but then we need to name then handleWithN since javac is not-very-good-with-overloads: https://gist.github.com/ktoso/76248c629bd614c81624

If we change then to extend the matching function interfaces and have function in method params as well, why keep the Handler2? If users want to they can make their Handler, and if we don't require a type in APIs, let's not have it.

Maybe I'm overthinking, but I feel that the API proposed in the above commit I linked "looks more like akka streams", so maybe javadsl users would be more familiar with it... The handleWith## uglieness is a cost though :~

Do you have an opinion on this @rkuhn @viktorklang (using Roland while it's still monday ;-))

This comment has been minimized.

@ktoso

ktoso Jul 13, 2015

Member

Ok, it seems we'll want to provide the "like akka-streams javadsl" style API here. I'll handle that, and Johannes focuses on remaining docs :)

// conclusions here ktoso@8784c18#commitcomment-12135171

@ktoso

ktoso Jul 13, 2015

Member

Ok, it seems we'll want to provide the "like akka-streams javadsl" style API here. I'll handle that, and Johannes focuses on remaining docs :)

// conclusions here ktoso@8784c18#commitcomment-12135171

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Jul 14, 2015

Member

Merging and will follow up with the changes discussed in ktoso@8784c18#commitcomment-12135171

Member

ktoso commented Jul 14, 2015

Merging and will follow up with the changes discussed in ktoso@8784c18#commitcomment-12135171

ktoso added a commit that referenced this pull request Jul 14, 2015

@ktoso ktoso merged commit d8523e9 into akka:release-2.3-dev Jul 14, 2015

1 of 2 checks passed

default Merged build finished.
Details
typesafe-cla-validator All users have signed the CLA
Details

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 14, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 15, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 15, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 15, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 15, 2015

ktoso added a commit to ktoso/akka that referenced this pull request Jul 15, 2015

ktoso added a commit that referenced this pull request Jul 15, 2015

Merge pull request #17988 from ktoso/wip-javadsl-handleWith-ktoso
!htp #17965 more consistent and 22-ified javadsl handleWith

ktoso added a commit to ktoso/akka that referenced this pull request Jan 11, 2016

ktoso added a commit to ktoso/akka that referenced this pull request Jan 11, 2016

ktoso added a commit to ktoso/akka that referenced this pull request Jan 11, 2016

ktoso added a commit to ktoso/akka that referenced this pull request Jan 11, 2016

Merge pull request akka#17988 from ktoso/wip-javadsl-handleWith-ktoso
!htp akka#17965 more consistent and 22-ified javadsl handleWith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment