public interface HttpServerRequest extends HttpServerScopes
Modifier and Type | Method and Description |
---|---|
default void |
authenticationComplete()
Notification that authentication is now complete.
|
void |
authenticationComplete(HttpServerMechanismsResponder responder)
Notification that authentication is now complete.
|
void |
authenticationComplete(HttpServerMechanismsResponder responder,
Runnable logoutHandler)
Notification that authentication is now complete.
|
default void |
authenticationFailed(String message)
Notification that authentication failes.
|
void |
authenticationFailed(String message,
HttpServerMechanismsResponder responder)
Notification that authentication failes.
|
void |
authenticationInProgress(HttpServerMechanismsResponder responder)
Notification that this mechanism has commenced but not completed authentication, typically because another challenge /
response round trip is required.
|
default void |
badRequest(HttpAuthenticationException failure)
Notification to indicate that this was a bad request.
|
void |
badRequest(HttpAuthenticationException failure,
HttpServerMechanismsResponder responder)
Notification to indicate that this was a bad request.
|
List<HttpServerCookie> |
getCookies()
Returns a
List containing all of the HttpServerCookie objects the client sent with this request, or an empty List if no cookies were included in the request. |
String |
getFirstParameterValue(String name)
Get the first value for the parameter specified.
|
String |
getFirstRequestHeaderValue(String headerName)
Get the first value for the header specified in the HTTP request.
|
InputStream |
getInputStream()
Returns the request input stream.
|
Set<String> |
getParameterNames()
Returns the names of all parameters either from the query string or from the form data where available.
|
Map<String,List<String>> |
getParameters()
Returns the parameters received in the current request.
|
List<String> |
getParameterValues(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
List . |
Certificate[] |
getPeerCertificates()
Get the peer certificates established on the connection.
|
List<String> |
getRequestHeaderValues(String headerName)
Get a list of all of the values set for the specified header within the HTTP request.
|
String |
getRequestMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
|
String |
getRequestPath()
Get the request path.
|
URI |
getRequestURI()
Get the URI representation for the current request.
|
InetSocketAddress |
getSourceAddress()
Get the source address of the HTTP request.
|
SSLSession |
getSSLSession()
Get the
SSLSession (if any) that has been established for the connection in use. |
default void |
noAuthenticationInProgress()
Notification from the mechanism to state no authentication is in progress whilst evaluating the current request.
|
void |
noAuthenticationInProgress(HttpServerMechanismsResponder responder)
Notification from the mechanism to state no authentication is in progress whilst evaluating the current request.
|
boolean |
resumeRequest()
Resume any previously suspended request.
|
boolean |
suspendRequest()
Suspend the current request so that it can be subsequently resumed.
|
getScope, getScope, getScopeIds
List<String> getRequestHeaderValues(String headerName)
headerName
- the not null
name of the header the values are required for.null
should be returned.String getFirstRequestHeaderValue(String headerName)
headerName
- the not null
name of the header the value is required for.null
should
be returned instead.SSLSession getSSLSession()
SSLSession
(if any) that has been established for the connection in use.
Note that even if this is null getPeerCertificates()
can still return some certificates, as the certificates
may have been provided to the underlying server via some external mechanism (such as headers).SSLSession
(if any) that has been established for the connection in use, or null
if none
exists.Certificate[] getPeerCertificates()
null
if none available.void noAuthenticationInProgress(HttpServerMechanismsResponder responder)
responder
- a HttpServerMechanismsResponder
that can send a challenge should it be required.default void noAuthenticationInProgress()
void authenticationInProgress(HttpServerMechanismsResponder responder)
responder
- a HttpServerMechanismsResponder
that can send a challenge should it be required.void authenticationComplete(HttpServerMechanismsResponder responder)
responder
- a HttpServerMechanismsResponder
that can send a response.void authenticationComplete(HttpServerMechanismsResponder responder, Runnable logoutHandler)
Notification that authentication is now complete.
This method behaves exactly like {@link #authenticationComplete(HttpServerMechanismsResponder)}
, allowing
mechanisms to register a logout handler which should be called when a logout request is received by the underlying container.
responder
- a HttpServerMechanismsResponder
that can send a response.logoutHandler
- a Runnable
that can handle logoutdefault void authenticationComplete()
void authenticationFailed(String message, HttpServerMechanismsResponder responder)
message
- an error message describing the failure.responder
- a HttpServerMechanismsResponder
that can send a challenge should it be required.default void authenticationFailed(String message)
message
- an error message describing the failure.void badRequest(HttpAuthenticationException failure, HttpServerMechanismsResponder responder)
failure
- an HttpAuthenticationException
to describe the error.responder
- a HttpServerMechanismsResponder
that can send a challenge should it be required.default void badRequest(HttpAuthenticationException failure)
failure
- an HttpAuthenticationException
to describe the error.String 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>> getParameters()
List
will contain the values from the query
string followed by the values from the form data.Set<String> getParameterNames()
List<String> getParameterValues(String name)
List
.name
- the name of the desires parameter values.null
if the parameter was not in the request.String getFirstParameterValue(String name)
name
- the name of the parameter the first value is required for.null
if the parameter is not available.List<HttpServerCookie> getCookies()
List
containing all of the HttpServerCookie
objects the client sent with this request, or an empty List
if no cookies were included in the request.List
containing all of the HttpServerCookie
objects the client sent with this request, or an empty List
if no cookies were included in the request.InputStream getInputStream()
InetSocketAddress getSourceAddress()
boolean suspendRequest()
true
if suspending requests is supported, false
otherwise.boolean resumeRequest()
true
if resuming requests is supported, false
otherwise.Copyright © 2020 JBoss by Red Hat. All rights reserved.