public final class ReactiveServerExchangeHandler extends Object implements AsyncServerExchangeHandler
AsyncServerExchangeHandler designed to work with reactive streams.| Constructor and Description | 
|---|
| ReactiveServerExchangeHandler(ReactiveRequestProcessor requestProcessor)Creates a  ReactiveServerExchangeHandler. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | available()Returns the number of bytes immediately available for output. | 
| void | consume(ByteBuffer src)Triggered to pass incoming data to the data consumer. | 
| void | failed(Exception cause)Triggered to signal a failure in data processing. | 
| void | handleRequest(HttpRequest request,
             EntityDetails entityDetails,
             ResponseChannel responseChannel,
             HttpContext context)Processes the actual HTTP request. | 
| void | produce(DataStreamChannel channel)Triggered to signal the ability of the underlying data channel
 to accept more data. | 
| void | releaseResources() | 
| void | streamEnd(List<? extends Header> trailers)Triggered to signal termination of the data stream. | 
| void | updateCapacity(CapacityChannel capacityChannel)Triggered to signal ability of the underlying data stream to receive
 data capacity update. | 
public ReactiveServerExchangeHandler(ReactiveRequestProcessor requestProcessor)
ReactiveServerExchangeHandler.requestProcessor - the ReactiveRequestProcessor instance to
                         invoke when the request is ready to be handled.public void handleRequest(HttpRequest request, EntityDetails entityDetails, ResponseChannel responseChannel, HttpContext context) throws HttpException, IOException
AsyncServerExchangeHandlerhandleRequest in interface AsyncServerExchangeHandlerrequest - the actual request.entityDetails - the request entity details or null if the request
                      does not enclose an entity.responseChannel - the response channel.context - the actual execution context.HttpExceptionIOExceptionpublic void failed(Exception cause)
AsyncDataExchangeHandlerfailed in interface AsyncDataExchangeHandlercause - the cause of the failure.public void updateCapacity(CapacityChannel capacityChannel) throws IOException
AsyncDataConsumerupdateCapacity in interface AsyncDataConsumercapacityChannel - the channel for capacity updates.IOExceptionpublic void consume(ByteBuffer src) throws IOException
AsyncDataConsumerconsume in interface AsyncDataConsumersrc - data source.IOExceptionpublic void streamEnd(List<? extends Header> trailers) throws HttpException, IOException
AsyncDataConsumerstreamEnd in interface AsyncDataConsumertrailers - data stream trailers.HttpExceptionIOExceptionpublic int available()
AsyncDataProduceravailable in interface AsyncDataProducerpublic void produce(DataStreamChannel channel) throws IOException
AsyncDataProducerproduce in interface AsyncDataProducerchannel - the data channel capable to accepting more data.IOExceptionpublic void releaseResources()
releaseResources in interface ResourceHolderCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.