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() |
void |
consume(ByteBuffer src) |
void |
failed(Exception cause) |
void |
handleRequest(HttpRequest request,
EntityDetails entityDetails,
ResponseChannel responseChannel,
HttpContext context) |
void |
produce(DataStreamChannel channel) |
void |
releaseResources() |
void |
streamEnd(List<? extends Header> trailers) |
void |
updateCapacity(CapacityChannel capacityChannel) |
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
handleRequest
in interface AsyncServerExchangeHandler
HttpException
IOException
public void failed(Exception cause)
failed
in interface AsyncDataExchangeHandler
public void updateCapacity(CapacityChannel capacityChannel) throws IOException
updateCapacity
in interface AsyncDataConsumer
IOException
public void consume(ByteBuffer src) throws IOException
consume
in interface AsyncDataConsumer
IOException
public void streamEnd(List<? extends Header> trailers) throws HttpException, IOException
streamEnd
in interface AsyncDataConsumer
HttpException
IOException
public int available()
available
in interface AsyncDataProducer
public void produce(DataStreamChannel channel) throws IOException
produce
in interface AsyncDataProducer
IOException
public void releaseResources()
releaseResources
in interface ResourceHolder
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.