protected static final class HttpOperations.PostHeadersNettyOutbound extends java.lang.Object implements NettyOutbound, java.util.function.Consumer<java.lang.Throwable>, java.lang.Runnable
Constructor and Description |
---|
PostHeadersNettyOutbound(reactor.core.publisher.Mono<java.lang.Void> source,
HttpOperations<?,?> parent,
io.netty.buffer.ByteBuf msg) |
Modifier and Type | Method and Description |
---|---|
void |
accept(java.lang.Throwable throwable) |
io.netty.buffer.ByteBufAllocator |
alloc()
Returns the assigned
ByteBufAllocator . |
void |
run() |
NettyOutbound |
send(org.reactivestreams.Publisher<? extends io.netty.buffer.ByteBuf> dataStream,
java.util.function.Predicate<io.netty.buffer.ByteBuf> predicate)
Sends data to the peer, listens for any error on write and closes on terminal signal
(complete|error).
|
NettyOutbound |
sendObject(java.lang.Object message)
Sends data to the peer, listens for any error on write and closes on terminal signal
(complete|error).
|
NettyOutbound |
sendObject(org.reactivestreams.Publisher<?> dataStream,
java.util.function.Predicate<java.lang.Object> predicate)
Sends an object through Netty pipeline.
|
<S> NettyOutbound |
sendUsing(java.util.concurrent.Callable<? extends S> sourceInput,
java.util.function.BiFunction<? super Connection,? super S,?> mappedInput,
java.util.function.Consumer<? super S> sourceCleanup)
Binds a send to a starting/cleanup lifecycle
|
reactor.core.publisher.Mono<java.lang.Void> |
then()
Obtains a
Mono of pending outbound(s) write completion. |
NettyOutbound |
withConnection(java.util.function.Consumer<? super Connection> withConnection)
Call the passed callback with a
Connection to operate on the underlying
Channel state. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
neverComplete, send, sendByteArray, sendFile, sendFile, sendFileChunked, sendGroups, sendObject, sendString, sendString, subscribe, then, then
public PostHeadersNettyOutbound(reactor.core.publisher.Mono<java.lang.Void> source, HttpOperations<?,?> parent, @Nullable io.netty.buffer.ByteBuf msg)
public void run()
run
in interface java.lang.Runnable
public void accept(java.lang.Throwable throwable)
accept
in interface java.util.function.Consumer<java.lang.Throwable>
public reactor.core.publisher.Mono<java.lang.Void> then()
NettyOutbound
Mono
of pending outbound(s) write completion.then
in interface NettyOutbound
Mono
of pending outbound(s) write completionpublic io.netty.buffer.ByteBufAllocator alloc()
NettyOutbound
ByteBufAllocator
.alloc
in interface NettyOutbound
ByteBufAllocator
public NettyOutbound send(org.reactivestreams.Publisher<? extends io.netty.buffer.ByteBuf> dataStream, java.util.function.Predicate<io.netty.buffer.ByteBuf> predicate)
NettyOutbound
A new NettyOutbound
type (or the same) for typed send
sequences.
Note: Nesting any send* method is not supported.
send
in interface NettyOutbound
dataStream
- the dataStream publishing OUT items to write on this channelpredicate
- that returns true if explicit flush operation is needed after that bufferNettyOutbound
to append further send. It will emit a complete
signal successful sequence write (e.g. after "flush") or any error during write.public NettyOutbound sendObject(org.reactivestreams.Publisher<?> dataStream, java.util.function.Predicate<java.lang.Object> predicate)
NettyOutbound
Publisher
, sends all signals,
flushing on complete by default. Write occur in FIFO sequence.
Note: Nesting any send* method is not supported.
sendObject
in interface NettyOutbound
dataStream
- the dataStream publishing items to write on this channel
or a simple pojo supported by configured Netty handlerspredicate
- that returns true if explicit flush operation is needed after that objectpublic NettyOutbound sendObject(java.lang.Object message)
NettyOutbound
Note: Nesting any send* method is not supported.
sendObject
in interface NettyOutbound
message
- the object to publishMono
to signal successful sequence write (e.g. after "flush") or
any error during writepublic <S> NettyOutbound sendUsing(java.util.concurrent.Callable<? extends S> sourceInput, java.util.function.BiFunction<? super Connection,? super S,?> mappedInput, java.util.function.Consumer<? super S> sourceCleanup)
NettyOutbound
Note: Nesting any send* method is not supported.
sendUsing
in interface NettyOutbound
S
- state typesourceInput
- state generatormappedInput
- input to sendsourceCleanup
- state cleanerNettyOutbound
public NettyOutbound withConnection(java.util.function.Consumer<? super Connection> withConnection)
NettyOutbound
Connection
to operate on the underlying
Channel
state.withConnection
in interface NettyOutbound
withConnection
- connection callbackConnection