public interface Context
Modifier and Type | Field and Description |
---|---|
static String |
ACCEPT |
static ZoneId |
GMT |
static DateTimeFormatter |
RFC1123 |
static String |
RFC1123_PATTERN |
static final String ACCEPT
static final ZoneId GMT
static final String RFC1123_PATTERN
static final DateTimeFormatter RFC1123
@Nonnull AttributeMap getAttributes()
@Nonnull String pathString()
@Nonnull QueryString query()
@Nonnull default String queryString()
?
or empty string.?
or empty string.default long getContentLength()
@Nonnull Multipart multipart()
IllegalStateException
when call it from
EVENT_LOOP thread
;@Nonnull default List<FileUpload> files()
@Nonnull default List<FileUpload> files(@Nonnull String name)
@Nonnull default FileUpload file(@Nonnull String name)
boolean isInIoThread()
@Nonnull Context setContentType(@Nonnull MediaType contentType, @Nullable Charset charset)
@Nonnull default Context setStatusCode(@Nonnull StatusCode statusCode)
@Nonnull StatusCode getStatusCode()
@Nonnull OutputStream responseStream()
@Nonnull default OutputStream responseStream(@Nonnull MediaType contentType)
@Nonnull default Context responseStream(@Nonnull MediaType contentType, @Nonnull Throwing.Consumer<OutputStream> consumer) throws Exception
Exception
@Nonnull default Context responseStream(@Nonnull Throwing.Consumer<OutputStream> consumer) throws Exception
Exception
@Nonnull default PrintWriter responseWriter()
@Nonnull default PrintWriter responseWriter(@Nonnull MediaType contentType)
@Nonnull PrintWriter responseWriter(@Nonnull MediaType contentType, @Nullable Charset charset)
@Nonnull default Context responseWriter(@Nonnull Throwing.Consumer<PrintWriter> consumer) throws Exception
Exception
@Nonnull default Context responseWriter(@Nonnull MediaType contentType, @Nonnull Throwing.Consumer<PrintWriter> consumer) throws Exception
Exception
@Nonnull default Context responseWriter(@Nonnull MediaType contentType, @Nullable Charset charset, @Nonnull Throwing.Consumer<PrintWriter> consumer) throws Exception
Exception
@Nonnull default Context sendRedirect(@Nonnull StatusCode redirect, @Nonnull String location)
@Nonnull Context sendBytes(@Nonnull ByteBuffer data)
@Nonnull Context sendBytes(@Nonnull ReadableByteChannel channel)
@Nonnull Context sendStream(@Nonnull InputStream input)
@Nonnull default Context sendAttachment(@Nonnull AttachedFile file)
@Nonnull Context sendFile(@Nonnull FileChannel file)
@Nonnull default Context sendStatusCode(@Nonnull StatusCode statusCode)
@Nonnull default Context sendError(@Nonnull Throwable cause, @Nonnull StatusCode statusCode)
boolean isResponseStarted()
Copyright © 2019. All rights reserved.