public class Connectors extends Object
HttpServerExchange
API.
It contains methods that logically belong on the exchange, however should only be used by connector implementations.
Constructor and Description |
---|
Connectors() |
Modifier and Type | Method and Description |
---|---|
static void |
executeRootHandler(HttpHandler handler,
HttpServerExchange exchange) |
static void |
flattenCookies(HttpServerExchange exchange)
Flattens the exchange cookie map into the response header map.
|
static ConduitStreamSinkChannel |
getConduitSinkChannel(HttpServerExchange exchange) |
static StreamSourceChannel |
getExistingRequestChannel(HttpServerExchange exchange)
Returns the existing request channel, if it exists.
|
static boolean |
isEntityBodyAllowed(HttpServerExchange exchange) |
static boolean |
isEntityBodyAllowed(int code) |
static void |
resetRequestChannel(HttpServerExchange exchange) |
static void |
setExchangeRequestPath(HttpServerExchange exchange,
String encodedPath,
String charset,
boolean decode,
boolean allowEncodedSlash,
StringBuilder decodeBuffer)
Deprecated.
|
static void |
setExchangeRequestPath(HttpServerExchange exchange,
String encodedPath,
String charset,
boolean decode,
boolean allowEncodedSlash,
StringBuilder decodeBuffer,
int maxParameters)
Sets the request path and query parameters, decoding to the requested charset.
|
static void |
setRequestStartTime(HttpServerExchange exchange) |
static void |
terminateRequest(HttpServerExchange exchange) |
static void |
terminateResponse(HttpServerExchange exchange) |
static void |
ungetRequestBytes(HttpServerExchange exchange,
PooledByteBuffer... buffers)
Attached buffered data to the exchange.
|
static void |
updateResponseBytesSent(HttpServerExchange exchange,
long bytes) |
public static void flattenCookies(HttpServerExchange exchange)
exchange
- The server exchangepublic static void ungetRequestBytes(HttpServerExchange exchange, PooledByteBuffer... buffers)
exchange
- The HTTP server exchangebuffers
- The buffers to attachpublic static void terminateRequest(HttpServerExchange exchange)
public static void terminateResponse(HttpServerExchange exchange)
public static void resetRequestChannel(HttpServerExchange exchange)
public static void setRequestStartTime(HttpServerExchange exchange)
public static void executeRootHandler(HttpHandler handler, HttpServerExchange exchange)
@Deprecated public static void setExchangeRequestPath(HttpServerExchange exchange, String encodedPath, String charset, boolean decode, boolean allowEncodedSlash, StringBuilder decodeBuffer)
exchange
- The exchangeencodedPath
- The encoded pathcharset
- The charsetpublic static void setExchangeRequestPath(HttpServerExchange exchange, String encodedPath, String charset, boolean decode, boolean allowEncodedSlash, StringBuilder decodeBuffer, int maxParameters) throws ParameterLimitException
exchange
- The exchangeencodedPath
- The encoded pathcharset
- The charsetParameterLimitException
public static StreamSourceChannel getExistingRequestChannel(HttpServerExchange exchange)
exchange
- The http server exchangepublic static boolean isEntityBodyAllowed(HttpServerExchange exchange)
public static boolean isEntityBodyAllowed(int code)
public static void updateResponseBytesSent(HttpServerExchange exchange, long bytes)
public static ConduitStreamSinkChannel getConduitSinkChannel(HttpServerExchange exchange)
Copyright © 2017 JBoss by Red Hat. All rights reserved.