Package reactor.netty.http
Class HttpOperations.PostHeadersNettyOutbound
java.lang.Object
java.util.concurrent.atomic.AtomicBoolean
reactor.netty.http.HttpOperations.PostHeadersNettyOutbound
- All Implemented Interfaces:
Serializable
,Publisher<Void>
,NettyOutbound
- Enclosing class:
- HttpOperations<INBOUND extends NettyInbound,
OUTBOUND extends NettyOutbound>
protected static final class HttpOperations.PostHeadersNettyOutbound
extends AtomicBoolean
implements NettyOutbound
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPostHeadersNettyOutbound
(Mono<Void> source, HttpOperations<?, ?> parent, @Nullable ByteBuf msg) -
Method Summary
Modifier and TypeMethodDescriptionalloc()
Returns the assignedByteBufAllocator
.Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error).sendObject
(Object message) Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error).sendObject
(Publisher<?> dataStream, Predicate<Object> predicate) Sends an object through Netty pipeline.<S> NettyOutbound
sendUsing
(Callable<? extends S> sourceInput, BiFunction<? super Connection, ? super S, ?> mappedInput, Consumer<? super S> sourceCleanup) Binds a send to a starting/cleanup lifecyclethen()
Obtains aMono
of pending outbound(s) write completion.withConnection
(Consumer<? super Connection> withConnection) Call the passed callback with aConnection
to operate on the underlyingChannel
state.Methods inherited from class java.util.concurrent.atomic.AtomicBoolean
compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndSet, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface reactor.netty.NettyOutbound
neverComplete, send, sendByteArray, sendFile, sendFile, sendFileChunked, sendGroups, sendObject, sendString, sendString, subscribe, then, then
-
Constructor Details
-
PostHeadersNettyOutbound
public PostHeadersNettyOutbound(Mono<Void> source, HttpOperations<?, ?> parent, @Nullable ByteBuf msg)
-
-
Method Details
-
then
Description copied from interface:NettyOutbound
Obtains aMono
of pending outbound(s) write completion.- Specified by:
then
in interfaceNettyOutbound
- Returns:
- a
Mono
of pending outbound(s) write completion
-
alloc
Description copied from interface:NettyOutbound
Returns the assignedByteBufAllocator
.- Specified by:
alloc
in interfaceNettyOutbound
- Returns:
- the
ByteBufAllocator
-
send
Description copied from interface:NettyOutbound
Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error).A new
NettyOutbound
type (or the same) for typed send sequences.Note: Nesting any send* method is not supported.
- Specified by:
send
in interfaceNettyOutbound
- Parameters:
dataStream
- the dataStream publishing OUT items to write on this channelpredicate
- that returns true if explicit flush operation is needed after that buffer- Returns:
- A new
NettyOutbound
to append further send. It will emit a complete signal successful sequence write (e.g. after "flush") or any error during write.
-
sendObject
Description copied from interface:NettyOutbound
Sends an object through Netty pipeline. If type ofPublisher
, sends all signals, flushing on complete by default. Write occur in FIFO sequence.Note: Nesting any send* method is not supported.
- Specified by:
sendObject
in interfaceNettyOutbound
- Parameters:
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 object- Returns:
- A Publisher to signal successful sequence write (e.g. after "flush") or any error during write
-
sendObject
Description copied from interface:NettyOutbound
Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error).Note: Nesting any send* method is not supported.
- Specified by:
sendObject
in interfaceNettyOutbound
- Parameters:
message
- the object to publish- Returns:
- A
Mono
to signal successful sequence write (e.g. after "flush") or any error during write
-
sendUsing
public <S> NettyOutbound sendUsing(Callable<? extends S> sourceInput, BiFunction<? super Connection, ? super S, ?> mappedInput, Consumer<? super S> sourceCleanup) Description copied from interface:NettyOutbound
Binds a send to a starting/cleanup lifecycleNote: Nesting any send* method is not supported.
- Specified by:
sendUsing
in interfaceNettyOutbound
- Type Parameters:
S
- state type- Parameters:
sourceInput
- state generatormappedInput
- input to sendsourceCleanup
- state cleaner- Returns:
- a new
NettyOutbound
-
withConnection
Description copied from interface:NettyOutbound
Call the passed callback with aConnection
to operate on the underlyingChannel
state.- Specified by:
withConnection
in interfaceNettyOutbound
- Parameters:
withConnection
- connection callback- Returns:
- the
Connection
-