-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Implement HttpContent.writeTo() async API #12020
Implement HttpContent.writeTo() async API #12020
Conversation
Signed-off-by: Ludovic Orban <[email protected]>
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/HttpContent.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java
Outdated
Show resolved
Hide resolved
…tations Signed-off-by: Ludovic Orban <[email protected]>
@gregw There are two things I take from you previous comment:
|
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Components.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/HttpContent.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Components.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
…tty-12.1.x/HttpContent-writeTo
Here is a summary of the status of the in progress:
still needed:
optional:
|
Signed-off-by: Ludovic Orban <[email protected]>
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ludovic Orban <[email protected]>
- give up on HttpContent.writeTo() overloading - standardize offset and length default values Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
I prefer to focus solely on |
Latest update: after a conversation with @sbordet, he managed to convince me that the
So I've modified So the final signature if the new async API finally has this elegant form: void writeTo(Content.Sink sink, long offset, long length, Callback callback); |
I'm not entirely convinced that the directness is unrelated. But am happy to have an elegant API and use configuration to align sizes and directness. |
Signed-off-by: Ludovic Orban <[email protected]>
…le > 2GiB Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
Show resolved
Hide resolved
...-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java
Outdated
Show resolved
Hide resolved
...-core/jetty-http/src/main/java/org/eclipse/jetty/http/content/CachingHttpContentFactory.java
Outdated
Show resolved
Hide resolved
…tty-12.1.x/HttpContent-writeTo
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Followup PRs:
Once all those have been merged, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close now....
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Content.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
…g a buffer pool Signed-off-by: Ludovic Orban <[email protected]>
…tty-12.1.x/HttpContent-writeTo
Implementation of the
HttpContent.writeTo()
async API.Fixes #8790