Package io.undertow.servlet.core
Class ServletBlockingHttpExchange
- java.lang.Object
-
- io.undertow.servlet.core.ServletBlockingHttpExchange
-
- All Implemented Interfaces:
BlockingHttpExchange,Closeable,AutoCloseable
public class ServletBlockingHttpExchange extends Object implements BlockingHttpExchange
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description ServletBlockingHttpExchange(HttpServerExchange exchange)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes both the input and output streamsInputStreamgetInputStream()Returns the input stream that is in use for this exchange.OutputStreamgetOutputStream()Returns the output stream that is in use for this exchange.ReceivergetReceiver()returns a receiver based on the provided input stream.SendergetSender()Returns a sender based on the provided output stream
-
-
-
Constructor Detail
-
ServletBlockingHttpExchange
public ServletBlockingHttpExchange(HttpServerExchange exchange)
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
Description copied from interface:BlockingHttpExchangeReturns the input stream that is in use for this exchange.- Specified by:
getInputStreamin interfaceBlockingHttpExchange- Returns:
- The input stream
-
getOutputStream
public OutputStream getOutputStream()
Description copied from interface:BlockingHttpExchangeReturns the output stream that is in use for this exchange. In some circumstances this may not be available, such as if a writer is being used for a servlet response- Specified by:
getOutputStreamin interfaceBlockingHttpExchange- Returns:
- The output stream
-
getSender
public Sender getSender()
Description copied from interface:BlockingHttpExchangeReturns a sender based on the provided output stream- Specified by:
getSenderin interfaceBlockingHttpExchange- Returns:
- A sender that uses the output stream
-
close
public void close() throws IOExceptionDescription copied from interface:BlockingHttpExchangeCloses both the input and output streams- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBlockingHttpExchange- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getReceiver
public Receiver getReceiver()
Description copied from interface:BlockingHttpExchangereturns a receiver based on the provided input stream.- Specified by:
getReceiverin interfaceBlockingHttpExchange- Returns:
- The receiver
-
-