io.undertow.server.protocol.http

## Class HttpContinue

- java.lang.Object
- - io.undertow.server.protocol.http.HttpContinue

    public class HttpContinue
    extends Object

Class that provides support for dealing with HTTP 100 (Continue) responses.

Note that if a client is pipelining some requests and sending continue for others this could cause problems if the pipelining buffer is enabled.

Author:
  Stuart Douglas

### Nested Class Summary

Nested Classes
`static interface` `HttpContinue.ContinueResponseSender` A continue response that is in the process of being sent.

### Field Summary

Fields
`static String` `CONTINUE`

### Constructor Summary

Constructors
Constructor and Description
`HttpContinue()`

### Method Summary

All Methods Static Methods Concrete Methods
`static HttpContinue.ContinueResponseSender` `createResponseSender(HttpServerExchange exchange)` Creates a response sender that can be used to send a HTTP 100-continue response.
`static boolean` `isContinueResponseSent(HttpServerExchange exchange)`
`static void` `markContinueResponseSent(HttpServerExchange exchange)` Marks a continue response as already having been sent.
`static void` `rejectExchange(HttpServerExchange exchange)` Sets a 417 response code and ends the exchange.
`static boolean` `requiresContinueResponse(HeaderMap requestHeaders)`
`static boolean` `requiresContinueResponse(HttpServerExchange exchange)` Returns true if this exchange requires the server to send a 100 (Continue) response.
`static void` `sendContinueResponse(HttpServerExchange exchange, IoCallback callback)` Sends a continuation using async IO, and calls back when it is complete.
`static void` `sendContinueResponseBlocking(HttpServerExchange exchange)` Sends a continue response using blocking IO

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### CONTINUE

    public static final String CONTINUE

See Also:
  Constant Field Values

### Constructor Detail

#### HttpContinue

    public HttpContinue()

### Method Detail

#### requiresContinueResponse

    public static boolean requiresContinueResponse(HttpServerExchange exchange)

Returns true if this exchange requires the server to send a 100 (Continue) response.

Parameters:
  `exchange` - The exchange
Returns:
  `true` if the server needs to send a continue response

#### requiresContinueResponse

    public static boolean requiresContinueResponse(HeaderMap requestHeaders)

#### isContinueResponseSent

    public static boolean isContinueResponseSent(HttpServerExchange exchange)

#### sendContinueResponse

    public static void sendContinueResponse(HttpServerExchange exchange,
                                            IoCallback callback)

Sends a continuation using async IO, and calls back when it is complete.

Parameters:
  `exchange` - The exchange
  `callback` - The completion callback

#### createResponseSender

    public static HttpContinue.ContinueResponseSender createResponseSender(HttpServerExchange exchange)
                                                                    throws IOException

Creates a response sender that can be used to send a HTTP 100-continue response.

Parameters:
  `exchange` - The exchange
Returns:
  The response sender
Throws:
  `IOException`

#### markContinueResponseSent

    public static void markContinueResponseSent(HttpServerExchange exchange)

Marks a continue response as already having been sent. In general this should only be used by low level handlers than need fine grained control over the continue response.

Parameters:
  `exchange` - The exchange

#### sendContinueResponseBlocking

    public static void sendContinueResponseBlocking(HttpServerExchange exchange)
                                             throws IOException

Sends a continue response using blocking IO

Parameters:
  `exchange` - The exchange
Throws:
  `IOException`

#### rejectExchange

    public static void rejectExchange(HttpServerExchange exchange)

Sets a 417 response code and ends the exchange.

Parameters:
  `exchange` - The exchange to reject