
public interface HttpExchangeSpi extends HttpServerScopes
| Modifier and Type | Method and Description |
|---|---|
void |
addResponseHeader(String headerName,
String headerValue)
Add the specified header and value to the end of the current response headers,
|
void |
authenticationComplete(SecurityIdentity securityIdentity,
String mechanismName)
Notification that authentication has been completed for a specific identity using a specific authentication mechanism.
|
void |
authenticationFailed(String message,
String mechanismName)
Notification that authentication has failed using the mechanism specified.
|
void |
badRequest(HttpAuthenticationException error,
String mechanismName)
Notification that authentication has failed for a specific mechanism due to being a bad request.
|
default int |
forward(String path)
Forward the current request to a different path.
|
List<HttpServerCookie> |
getCookies()
Returns a
List containing all of the HttpServerCookie objects the client sent with this request. |
default String |
getFirstRequestHeaderValue(String headerName)
Get the first value for the header specified in the HTTP request.
|
default String |
getFirstRequestParameterValue(String name)
Get the first value for the parameter specified.
|
default Certificate[] |
getPeerCertificates(boolean renegotiate)
Get the peer certificates (if any) associated with the current connection.
|
List<String> |
getRequestHeaderValues(String headerName)
Get a list of all of the values set for the specified header within the HTTP request.
|
InputStream |
getRequestInputStream()
Returns the request input stream.
|
String |
getRequestMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
|
default Set<String> |
getRequestParameterNames()
Returns the names of all parameters either from the query string or from the form data where available.
|
Map<String,List<String>> |
getRequestParameters()
Returns the parameters received in the current request.
|
default List<String> |
getRequestParameterValues(String name)
Return the values for the parameter specified, where a parameter is specified both in the query string and in the form data the query string values will be first in the array.
|
String |
getRequestPath()
Get the request path.
|
URI |
getRequestURI()
Get the URI representation for the current request.
|
OutputStream |
getResponseOutputStream()
Returns the response output stream.
|
InetSocketAddress |
getSourceAddress()
Get the source address of the HTTP request.
|
default SSLSession |
getSSLSession()
Get the
SSLSession (if any) that has been established for the connection in use. |
default boolean |
resumeRequest()
Resume a previously suspended request.
|
void |
setResponseCookie(HttpServerCookie cookie)
Sets a response cookie.
|
void |
setStatusCode(int statusCode)
Set the required status code.
|
default boolean |
suspendRequest()
Suspend the current request so that it can be subsequently resumed.
|
getScope, getScope, getScopeIdsList<String> getRequestHeaderValues(String headerName)
headerName - the not null name of the header the values are required for.null should be returned.void addResponseHeader(String headerName, String headerValue)
headerName - the name of the header.headerValue - the value of the header.default String getFirstRequestHeaderValue(String headerName)
default implementation of this method is provided although implementations of this SPI may choose to provide their own optimised implementation.headerName - the not null name of the header the value is required for.null should be returned instead.default SSLSession getSSLSession()
SSLSession (if any) that has been established for the connection in use.SSLSession (if any) that has been established for the connection in use, or null if none
exists.default Certificate[] getPeerCertificates(boolean renegotiate)
null. null will also still be returned if after re-negotiation peer certificates are still not
available.renegotiate - if no certificates are available should re-negotiation of the session be attempted.null if none associated.void setStatusCode(int statusCode)
statusCode - the desired status code.void authenticationComplete(SecurityIdentity securityIdentity, String mechanismName)
securityIdentity - the identity of the authenticated account.mechanismName - the name of the mechanism that was used to authenticate the account.void authenticationFailed(String message, String mechanismName)
message - an error message describing the failuremechanismName - a failed mechanism namevoid badRequest(HttpAuthenticationException error, String mechanismName)
error - an exception to describe the error.mechanismName - a failed mechanism nameString getRequestMethod()
String specifying the name of the method with which this request was madeURI getRequestURI()
String getRequestPath()
http://my.appserver.com/my-application/path/sub-path this method is going to return /path/sub-path.Map<String,List<String>> getRequestParameters()
default Set<String> getRequestParameterNames()
default List<String> getRequestParameterValues(String name)
name - the name of the desires parameter values.null if the parameter was not in the request.default String getFirstRequestParameterValue(String name)
name - the name of the parameter the first value is required for.null if the paramter is not available.List<HttpServerCookie> getCookies()
List containing all of the HttpServerCookie objects the client sent with this request. This method should return an empty List if no cookies were sent.List of all the cookies included with this request.InputStream getRequestInputStream()
InetSocketAddress getSourceAddress()
void setResponseCookie(HttpServerCookie cookie)
cookie - the cookieOutputStream getResponseOutputStream()
default int forward(String path)
-1 if forwarding was not successful.default boolean suspendRequest()
true if suspension is supported, false otherwise.default boolean resumeRequest()
true if resuming a request is supported, false otherwise.Copyright © 2020 JBoss by Red Hat. All rights reserved.