-
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
ByteChannelContentSource #11910
ByteChannelContentSource #11910
Conversation
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
Show resolved
Hide resolved
@gregw I looked at the So considering we already have this do we really need the |
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ContentSourceTest.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/ContentSourceTest.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/internal/ContentCopier.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/test/java/org/eclipse/jetty/io/internal/ContentCopierTest.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ExceptionUtil.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/PathRequestContent.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferPool.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/ByteChannelContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/InputStreamContentSource.java
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/content/PathContentSource.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/internal/ContentCopier.java
Show resolved
Hide resolved
Reverted PathContentSource to previous implementation, but with deprecated methods Simplified ByteChannelContentSource more rewind tests.
Reverted PathContentSource to previous implementation, but with deprecated methods Simplified ByteChannelContentSource more rewind tests.
@lachlan-roberts can you review this in light of @sbordet being on vacation. Can you check if I have addressed all his points sufficiently. |
This PR introduces a
ByteChannelContentSource
which is needed for the spring framework integration.It also introduces a few minor utilities:
ByteBufferPool.Sized
class that is aByteBufferPool.Wrapper
with a configured size and type so a no argsacquire()
method can be called. This avoid the need to many classes to have a three fields: pool, size and direct and also can avoid constructors/methods with size and directExceptionUtil.run(Runnable, Consumer<Throwable> failure)
that is a simple try catch and avoids many private methods being created to do just that.