-
- All Implemented Interfaces:
public final class HttpServerContext
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<?, ?>attributesprivate final HttpServerRequestPortrequestprivate final HttpServerResponseresponseprivate final Exceptionexceptionprivate final HttpMethodmethodprivate final HttpProtocolprotocolprivate final Stringhostprivate final Integerportprivate final Stringpathprivate final QueryParametersqueryParametersprivate final List<HttpPart>partsprivate final FormParametersformParametersprivate final List<ContentType>acceptprivate final Authorizationauthorizationprivate final List<X509Certificate>certificateChainprivate final Map<String, HttpPart>partsMapprivate final URLurlprivate final StringuserAgentprivate final Stringrefererprivate final Stringoriginprivate final X509Certificatecertificateprivate final HttpStatusstatusprivate final Map<String, String>pathParametersprivate final Context<HttpServerCall>context
-
Constructor Summary
Constructors Constructor Description HttpServerContext(HttpServerRequestPort request, HttpServerResponse response, HttpServerPredicate predicate, Map<?, ?> attributes)HttpServerContext(Context<HttpServerCall> context)
-
Method Summary
Modifier and Type Method Description final Map<?, ?>getAttributes()final HttpServerRequestPortgetRequest()final HttpServerResponsegetResponse()final ExceptiongetException()final HttpMethodgetMethod()final HttpProtocolgetProtocol()final StringgetHost()final IntegergetPort()final StringgetPath()final QueryParametersgetQueryParameters()final List<HttpPart>getParts()final FormParametersgetFormParameters()final List<ContentType>getAccept()final AuthorizationgetAuthorization()final List<X509Certificate>getCertificateChain()final Map<String, HttpPart>getPartsMap()final URLgetUrl()final StringgetUserAgent()final StringgetReferer()final StringgetOrigin()final X509CertificategetCertificate()final HttpStatusgetStatus()final Map<String, String>getPathParameters()final Context<HttpServerCall>getContext()final HttpServerContextnext()final HttpServerContextsuccess(SuccessStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextredirect(RedirectionStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextclientError(ClientErrorStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextunauthorized(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextforbidden(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextserverError(ServerErrorStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextserverError(ServerErrorStatus status, Exception exception, Headers headers, Map<?, ?> attributes)final HttpServerContextinternalServerError(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextinternalServerError(Exception exception, Headers headers, Map<?, ?> attributes)final HttpServerContextok(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextsse(Flow.Publisher<ServerEvent> body)final HttpServerContextbadRequest(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextnotFound(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextcreated(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextaccepted(Function1<WsServerSession, Unit> onConnect, Function2<WsServerSession, ByteArray, Unit> onBinary, Function2<WsServerSession, String, Unit> onText, Function2<WsServerSession, ByteArray, Unit> onPing, Function2<WsServerSession, ByteArray, Unit> onPong, Function3<WsServerSession, WsCloseStatus, String, Unit> onClose)final HttpServerContextsend(HttpStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)final HttpServerContextsend(HttpServerResponse response, Map<?, ?> attributes)-
-
Constructor Detail
-
HttpServerContext
HttpServerContext(HttpServerRequestPort request, HttpServerResponse response, HttpServerPredicate predicate, Map<?, ?> attributes)
-
HttpServerContext
HttpServerContext(Context<HttpServerCall> context)
-
-
Method Detail
-
getAttributes
final Map<?, ?> getAttributes()
-
getRequest
final HttpServerRequestPort getRequest()
-
getResponse
final HttpServerResponse getResponse()
-
getException
final Exception getException()
-
getMethod
final HttpMethod getMethod()
-
getProtocol
final HttpProtocol getProtocol()
-
getHost
final String getHost()
-
getPort
final Integer getPort()
-
getPath
final String getPath()
-
getQueryParameters
final QueryParameters getQueryParameters()
-
getParts
final List<HttpPart> getParts()
-
getFormParameters
final FormParameters getFormParameters()
-
getAccept
final List<ContentType> getAccept()
-
getAuthorization
final Authorization getAuthorization()
-
getCertificateChain
final List<X509Certificate> getCertificateChain()
-
getPartsMap
final Map<String, HttpPart> getPartsMap()
-
getUrl
final URL getUrl()
-
getUserAgent
final String getUserAgent()
-
getReferer
final String getReferer()
-
getOrigin
final String getOrigin()
-
getCertificate
final X509Certificate getCertificate()
-
getStatus
final HttpStatus getStatus()
-
getPathParameters
final Map<String, String> getPathParameters()
-
getContext
final Context<HttpServerCall> getContext()
-
next
final HttpServerContext next()
-
success
final HttpServerContext success(SuccessStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
redirect
final HttpServerContext redirect(RedirectionStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
clientError
final HttpServerContext clientError(ClientErrorStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
unauthorized
final HttpServerContext unauthorized(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
forbidden
final HttpServerContext forbidden(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
serverError
final HttpServerContext serverError(ServerErrorStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
serverError
final HttpServerContext serverError(ServerErrorStatus status, Exception exception, Headers headers, Map<?, ?> attributes)
-
internalServerError
final HttpServerContext internalServerError(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
internalServerError
final HttpServerContext internalServerError(Exception exception, Headers headers, Map<?, ?> attributes)
-
ok
final HttpServerContext ok(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
sse
final HttpServerContext sse(Flow.Publisher<ServerEvent> body)
-
badRequest
final HttpServerContext badRequest(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
notFound
final HttpServerContext notFound(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
created
final HttpServerContext created(Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
accepted
final HttpServerContext accepted(Function1<WsServerSession, Unit> onConnect, Function2<WsServerSession, ByteArray, Unit> onBinary, Function2<WsServerSession, String, Unit> onText, Function2<WsServerSession, ByteArray, Unit> onPing, Function2<WsServerSession, ByteArray, Unit> onPong, Function3<WsServerSession, WsCloseStatus, String, Unit> onClose)
-
send
final HttpServerContext send(HttpStatus status, Object body, Headers headers, ContentType contentType, List<Cookie> cookies, Map<?, ?> attributes)
-
send
final HttpServerContext send(HttpServerResponse response, Map<?, ?> attributes)
-
-
-
-