Package io.micronaut.http.netty.body
Class AvailableNettyByteBody
java.lang.Object
io.micronaut.http.body.InternalByteBody
io.micronaut.http.netty.body.AvailableNettyByteBody
- All Implemented Interfaces:
io.micronaut.http.body.AvailableByteBody,io.micronaut.http.body.ByteBody,io.micronaut.http.body.CloseableAvailableByteBody,io.micronaut.http.body.CloseableByteBody,Closeable,AutoCloseable
@Internal
@Deprecated(since="4.10.0",
forRemoval=true)
public final class AvailableNettyByteBody
extends io.micronaut.http.body.InternalByteBody
implements io.micronaut.http.body.CloseableAvailableByteBody
Deprecated, for removal: This API element is subject to removal in a future version.
Netty ByteBuf implementation of ImmediateByteBody.
- Since:
- 4.5.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.http.body.ByteBody
io.micronaut.http.body.ByteBody.BodyDiscardedException, io.micronaut.http.body.ByteBody.SplitBackpressureMode -
Constructor Summary
ConstructorsConstructorDescriptionAvailableNettyByteBody(@NonNull io.netty.buffer.ByteBuf buffer) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescription@NonNull io.micronaut.core.execution.ExecutionFlow<? extends io.micronaut.http.body.CloseableAvailableByteBody>Deprecated, for removal: This API element is subject to removal in a future version.voidclose()Deprecated, for removal: This API element is subject to removal in a future version.static @NonNull io.micronaut.http.body.CloseableByteBodycreateChecked(@NonNull io.netty.channel.EventLoop loop, @NonNull io.micronaut.http.body.stream.BodySizeLimits bodySizeLimits, @NonNull io.netty.buffer.ByteBuf buf) Deprecated, for removal: This API element is subject to removal in a future version.This is a wrapper aroundAvailableNettyByteBody(ByteBuf)with an extra body length check.static io.micronaut.http.body.CloseableAvailableByteBodyempty()Deprecated, for removal: This API element is subject to removal in a future version.longlength()Deprecated, for removal: This API element is subject to removal in a future version.@NonNull io.micronaut.http.body.CloseableByteBodymove()Deprecated, for removal: This API element is subject to removal in a future version.io.netty.buffer.ByteBufpeek()Deprecated, for removal: This API element is subject to removal in a future version.@NonNull io.micronaut.http.body.CloseableAvailableByteBodysplit()Deprecated, for removal: This API element is subject to removal in a future version.byte @NonNull []Deprecated, for removal: This API element is subject to removal in a future version.static @NonNull io.netty.buffer.ByteBuftoByteBuf(@NonNull io.micronaut.http.body.AvailableByteBody body) Deprecated, for removal: This API element is subject to removal in a future version.@NonNull io.micronaut.core.io.buffer.ByteBuffer<?>Deprecated, for removal: This API element is subject to removal in a future version.@NonNull InputStreamDeprecated, for removal: This API element is subject to removal in a future version.@NonNull org.reactivestreams.Publisher<io.micronaut.core.io.buffer.ReadBuffer>Deprecated, for removal: This API element is subject to removal in a future version.@NonNull StringDeprecated, for removal: This API element is subject to removal in a future version.voidtouch()Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class io.micronaut.http.body.InternalByteBody
buffer, bufferFlow, failClaim, recordClosed, recordPrimaryOp, toByteArrayPublisherMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.body.AvailableByteBody
expectedLength, split, toByteArrayPublisher, toByteBufferPublisher, toReadBufferMethods inherited from interface io.micronaut.http.body.ByteBody
bufferMethods inherited from interface io.micronaut.http.body.CloseableAvailableByteBody
allowDiscard
-
Constructor Details
-
AvailableNettyByteBody
public AvailableNettyByteBody(@NonNull @NonNull io.netty.buffer.ByteBuf buffer) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
empty
public static io.micronaut.http.body.CloseableAvailableByteBody empty()Deprecated, for removal: This API element is subject to removal in a future version. -
toByteBuf
@NonNull public static @NonNull io.netty.buffer.ByteBuf toByteBuf(@NonNull @NonNull io.micronaut.http.body.AvailableByteBody body) Deprecated, for removal: This API element is subject to removal in a future version. -
createChecked
@NonNull public static @NonNull io.micronaut.http.body.CloseableByteBody createChecked(@NonNull @NonNull io.netty.channel.EventLoop loop, @NonNull @NonNull io.micronaut.http.body.stream.BodySizeLimits bodySizeLimits, @NonNull @NonNull io.netty.buffer.ByteBuf buf) Deprecated, for removal: This API element is subject to removal in a future version.This is a wrapper aroundAvailableNettyByteBody(ByteBuf)with an extra body length check.- Parameters:
loop- The event loop for constructingStreamingNettyByteBodybodySizeLimits- The body size limits to checkbuf- The input buffer- Returns:
- The body with the given input buffer, or a
StreamingNettyByteBodywith the appropriate content length error
-
peek
public io.netty.buffer.ByteBuf peek()Deprecated, for removal: This API element is subject to removal in a future version. -
toInputStream
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
toInputStreamin interfaceio.micronaut.http.body.AvailableByteBody- Specified by:
toInputStreamin interfaceio.micronaut.http.body.ByteBody
-
length
public long length()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
lengthin interfaceio.micronaut.http.body.AvailableByteBody
-
bufferFlow
@NonNull public @NonNull io.micronaut.core.execution.ExecutionFlow<? extends io.micronaut.http.body.CloseableAvailableByteBody> bufferFlow()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
bufferFlowin classio.micronaut.http.body.InternalByteBody
-
close
public void close()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceio.micronaut.http.body.CloseableByteBody
-
toReadBufferPublisher
@NonNull public @NonNull org.reactivestreams.Publisher<io.micronaut.core.io.buffer.ReadBuffer> toReadBufferPublisher()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
toReadBufferPublisherin interfaceio.micronaut.http.body.AvailableByteBody- Specified by:
toReadBufferPublisherin interfaceio.micronaut.http.body.ByteBody- Specified by:
toReadBufferPublisherin classio.micronaut.http.body.InternalByteBody
-
toByteArray
public byte @NonNull [] toByteArray()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
toByteArrayin interfaceio.micronaut.http.body.AvailableByteBody
-
toByteBuffer
@NonNull public @NonNull io.micronaut.core.io.buffer.ByteBuffer<?> toByteBuffer()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
toByteBufferin interfaceio.micronaut.http.body.AvailableByteBody
-
move
@NonNull public @NonNull io.micronaut.http.body.CloseableByteBody move()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
movein interfaceio.micronaut.http.body.ByteBody
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
toStringin interfaceio.micronaut.http.body.AvailableByteBody
-
split
@NonNull public @NonNull io.micronaut.http.body.CloseableAvailableByteBody split()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
splitin interfaceio.micronaut.http.body.AvailableByteBody- Specified by:
splitin interfaceio.micronaut.http.body.ByteBody
-
touch
public void touch()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
touchin interfaceio.micronaut.http.body.ByteBody
-
NettyByteBodyFactory