ChannelOperations with state management for status and headers
(first HTTP response packet).
| Modifier and Type | Class and Description |
|---|---|
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final Function | bufferExtractorFunction
A channel object to |
| pack-priv static final int | |
| pack-priv static final ChannelHandler | |
| pack-priv static final AtomicIntegerFieldUpdater | |
| pack-priv final HttpMessageLogFactory | |
| pack-priv static final Logger | |
| pack-priv static final int | |
| pack-priv static final Pattern | |
| pack-priv volatile int |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | HttpOperations(Connection connection, ConnectionObserver listener, HttpMessageLogFactory httpMessageLogFactory)
|
| Modifier and Type | Method and Description |
|---|---|
| public HttpOperations | addHandlerFirst(String
handler name name, ChannelHandler handler instance handler)Overrides default reactor. ChannelHandler to the beginning of the "user" io.,
that is just after the reactor-added codecs.
|
| public HttpOperations | addHandlerLast(String
handler name name, ChannelHandler handler instance handler)Overrides default reactor. ChannelHandler to the end of the "user" io.,
that is just before the reactor-added handlers like NettyPipeline#ReactiveBridge.
|
| protected abstract void | |
| protected String | asDebugLogMessage(Object
the object to be transformed o)Overrides reactor. |
| pack-priv static void | |
| protected abstract void | |
| public final boolean | |
| protected HttpMessageLogFactory | |
| protected final String | |
| public boolean | isWebsocket()
Implements reactor. |
| protected final boolean | |
| protected final boolean | Returns: true if marked for the first timeMark the headers and body sent |
| protected final boolean | Returns: true if marked for the first timeMark the headers sent |
| protected abstract HttpMessage | |
| protected abstract void | |
| protected abstract HttpMessage | |
| public BufferFlux | receive()
Overrides reactor. Implements reactor. Flux extension that allows for extra decoding operators
|
| public String | |
| public static String | Returns: the decoded path portion from the providedurian HTTP URL that may contain a path with query/fragment uri)Returns the decoded path portion from the provided |
| public NettyOutbound | send(Publisher<? extends Buffer>
the dataStream publishing OUT items to write on this channel source)Overrides default reactor. |
| public final NettyOutbound | sendFile(Path
the file Path file, long where to start position, long how much to transfer count)Overrides default reactor. Path using
java.
support, if the system supports it, the path resolves to a local file
system File, compression and SSL/TLS is not enabled, then transfer will
use zero-byte copy to the peer., otherwise chunked read/write will be used.
|
| public NettyOutbound | sendObject(Object
the object to publish message)Overrides reactor. Implements reactor. |
| public Mono | then()
Overrides default reactor. Mono of pending outbound(s) write completion.
|
| public String | toString()
Overrides reactor. |
| BODY_SENT | back to summary |
|---|---|
| pack-priv static final int BODY_SENT | |
| bufferExtractorFunction | back to summary |
|---|---|
| pack-priv static final Function<Object, Buffer> bufferExtractorFunction A channel object to | |
| HEADERS_SENT | back to summary |
|---|---|
| pack-priv static final int HEADERS_SENT | |
| HTTP_EXTRACTOR | back to summary |
|---|---|
| pack-priv static final ChannelHandler HTTP_EXTRACTOR | |
| HTTP_STATE | back to summary |
|---|---|
pack-priv static final AtomicIntegerFieldUpdater<HttpOperations<INBOUND extends NettyInbound, OUTBOUND extends NettyOutbound>> HTTP_STATE
| |
| httpMessageLogFactory | back to summary |
|---|---|
| pack-priv final HttpMessageLogFactory httpMessageLogFactory | |
| log | back to summary |
|---|---|
| pack-priv static final Logger log | |
| READY | back to summary |
|---|---|
| pack-priv static final int READY | |
| SCHEME_PATTERN | back to summary |
|---|---|
| pack-priv static final Pattern SCHEME_PATTERN | |
| statusAndHeadersSent | back to summary |
|---|---|
| pack-priv volatile int statusAndHeadersSent | |
| HttpOperations | back to summary |
|---|---|
| protected HttpOperations(HttpOperations<INBOUND, OUTBOUND> replaced) | |
| HttpOperations | back to summary |
|---|---|
| protected HttpOperations(Connection connection, ConnectionObserver listener, HttpMessageLogFactory httpMessageLogFactory) | |
| addHandlerFirst | back to summary |
|---|---|
| public HttpOperations Overrides default reactor. Doc from reactor. Add a
If effectively added, the handler will be safely removed when the channel is made
inactive (pool release).
As the Connection object is available once the channel is in active state, events prior this state
will not be available (i.e.
| |
| addHandlerLast | back to summary |
|---|---|
| public HttpOperations Overrides default reactor. Doc from reactor. Add a
If effectively added, the handler will be safely removed when the channel is made
inactive (pool release).
As the Connection object is available once the channel is in active state, events prior this state
will not be available (i.e.
| |
| afterMarkSentHeaders | back to summary |
|---|---|
| protected abstract void afterMarkSentHeaders() | |
| asDebugLogMessage | back to summary |
|---|---|
| protected String asDebugLogMessage(Object o) Overrides reactor. Doc from reactor. Transforms the object to a string for debug logs. | |
| autoAddHttpExtractor | back to summary |
|---|---|
| pack-priv static void autoAddHttpExtractor(Connection c, String name, ChannelHandler handler) | |
| beforeMarkSentHeaders | back to summary |
|---|---|
| protected abstract void beforeMarkSentHeaders() | |
| hasSentHeaders | back to summary |
|---|---|
| public final boolean hasSentHeaders() Has headers been sent
| |
| httpMessageLogFactory | back to summary |
|---|---|
| protected HttpMessageLogFactory httpMessageLogFactory() | |
| initShortId | back to summary |
|---|---|
| protected final String initShortId() Overrides reactor.
| |
| isWebsocket | back to summary |
|---|---|
| public boolean isWebsocket() Implements reactor. Doc from reactor. Returns true if websocket connection (upgraded)
| |
| markSentBody | back to summary |
|---|---|
| protected final boolean markSentBody() Mark the body sent
| |
| markSentHeaderAndBody | back to summary |
|---|---|
| protected final boolean markSentHeaderAndBody(Object... objectsToRelease) Mark the headers and body sent
| |
| markSentHeaders | back to summary |
|---|---|
| protected final boolean markSentHeaders(Object... objectsToRelease) Mark the headers sent
| |
| newFullBodyMessage | back to summary |
|---|---|
| protected abstract HttpMessage newFullBodyMessage(Buffer body) | |
| onHeadersSent | back to summary |
|---|---|
| protected abstract void onHeadersSent() | |
| outboundHttpMessage | back to summary |
|---|---|
| protected abstract HttpMessage outboundHttpMessage() Outbound Netty HttpMessage
| |
| receive | back to summary |
|---|---|
| public BufferFlux receive() Overrides reactor. Implements reactor. Doc from reactor. A
| |
| requestId | back to summary |
|---|---|
| public String requestId() Implements reactor. Doc from reactor. Return a unique id for the request. The id is a combination of the id of the underlying connection and the serial number of the request received on that connection. Format of the id:
Example:
| |
| resolvePath | back to summary |
|---|---|
| public static String resolvePath(String uri) Returns the decoded path portion from the provided | |
| send | back to summary |
|---|---|
| public NettyOutbound send(Publisher<? extends Buffer> source) Overrides default reactor. Doc from reactor. Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error). A new Note Nesting any send* method is not supported. Note If you need to transform from
| |
| sendFile | back to summary |
|---|---|
| public final NettyOutbound sendFile(Path file, long position, long count) Overrides default reactor. Doc from reactor. Sends content from the given It will listens for any error on write and closes on terminal signal (complete|error). If more than one publisher is attached (multiple calls to send()) completion occurs after all publishers complete. Note: Nesting any send* method is not supported.
| |
| sendObject | back to summary |
|---|---|
| public NettyOutbound sendObject(Object message) Overrides reactor. Implements reactor. Doc from reactor. 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.
| |
| then | back to summary |
|---|---|
| public Mono Overrides default reactor. Doc from reactor. Obtains a | |
| toString | back to summary |
|---|---|
| public String toString() Overrides reactor. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Buffer | |
| pack-priv final HttpOperations | |
| pack-priv final Mono |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Throwable
the input argument throwable)Implements java. |
| public BufferAllocator | |
| public void | |
| public NettyOutbound | send(Publisher<? extends Buffer>
the dataStream publishing OUT items to write on this channel publisher, Predicate<Buffer> that returns true if explicit flush operation is needed after that buffer predicate)Implements reactor. |
| public NettyOutbound | sendObject(Publisher<?>
the dataStream publishing items to write on this channel
or a simple pojo supported by configured Netty handlers dataStream, Predicate<Object> that returns true if explicit flush operation is needed after that object predicate)Implements reactor. |
| public NettyOutbound | sendObject(Object
the object to publish message)Implements reactor. |
| public <S> NettyOutbound | sendUsing(Callable<? extends S>
state generator sourceInput, BiFunction<? super Connection, ? super S, ?> input to send mappedInput, Consumer<? super S> state cleaner sourceCleanup)Implements reactor. Note Nesting any send* method is not supported. |
| public Mono | then()
Overrides default reactor. Mono of pending outbound(s) write completion.
|
| public NettyOutbound | withConnection(Consumer<? super Connection>
connection callback withConnection)Implements reactor. Connection to operate on the underlying
Channel state.
|
| msg | back to summary |
|---|---|
| pack-priv final Buffer msg | |
| parent | back to summary |
|---|---|
| pack-priv final HttpOperations<?, ?> parent | |
| source | back to summary |
|---|---|
| pack-priv final Mono<Void> source | |
| PostHeadersNettyOutbound | back to summary |
|---|---|
| public PostHeadersNettyOutbound(Mono<Void> source, HttpOperations<?, ?> parent, Buffer msg) | |
| accept | back to summary |
|---|---|
| public void accept(Throwable throwable) Implements java. Doc from java. Performs this operation on the given argument. | |
| alloc | back to summary |
|---|---|
| public BufferAllocator alloc() Implements reactor. Doc from reactor. Returns the assigned
| |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |
| send | back to summary |
|---|---|
| public NettyOutbound send(Publisher<? extends Buffer> publisher, Predicate<Buffer> predicate) Implements reactor. Doc from reactor. Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error). A new Note Nesting any send* method is not supported. Note If you need to transform from
| |
| sendObject | back to summary |
|---|---|
| public NettyOutbound sendObject(Publisher<?> dataStream, Predicate<Object> predicate) Implements reactor. Doc from reactor. Sends an object through Netty pipeline. If type of Note Nesting any send* method is not supported.
| |
| sendObject | back to summary |
|---|---|
| public NettyOutbound sendObject(Object message) Implements reactor. Doc from reactor. 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.
| |
| sendUsing | back to summary |
|---|---|
| public <S> NettyOutbound sendUsing(Callable<? extends S> sourceInput, BiFunction<? super Connection, ? super S, ?> mappedInput, Consumer<? super S> sourceCleanup) Implements reactor. Doc from reactor. Binds a send to a starting/cleanup lifecycle Note Nesting any send* method is not supported.
| |
| then | back to summary |
|---|---|
| public Mono Overrides default reactor. Doc from reactor. Obtains a | |
| withConnection | back to summary |
|---|---|
| public NettyOutbound withConnection(Consumer<? super Connection> withConnection) Implements reactor. Doc from reactor. Call the passed callback with a
| |