public class HttpServerRequestWrapper extends Object implements HttpServerRequest
| Constructor and Description |
|---|
HttpServerRequestWrapper(HttpServerRequest delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticationComplete(HttpServerMechanismsResponder responder)
Notification that authentication is now complete.
|
void |
authenticationComplete(HttpServerMechanismsResponder responder,
Runnable logoutHandler)
Notification that authentication is now complete.
|
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.
|
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.
|
HttpScope |
getScope(Scope scope)
Get the specified
HttpScope if available. |
HttpScope |
getScope(Scope scope,
String id)
Get the specified
HttpScope with the specified ID. |
Collection<String> |
getScopeIds(Scope scope)
Get the IDs available for the scope specified.
|
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. |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitauthenticationComplete, authenticationFailed, badRequest, noAuthenticationInProgresspublic HttpServerRequestWrapper(HttpServerRequest delegate)
public HttpScope getScope(Scope scope)
HttpServerScopesHttpScope if available.getScope in interface HttpServerScopesscope - the type of the scope required.null if not supported.public Collection<String> getScopeIds(Scope scope)
HttpServerScopesgetScopeIds in interface HttpServerScopesscope - the scope the IDs are required for.null if the scope specified does not support obtaining scopes by ID.public HttpScope getScope(Scope scope, String id)
HttpServerScopesHttpScope with the specified ID.getScope in interface HttpServerScopesscope - the type of the scope required.id - the id of the scope instance required.null if not supported or if the scope with that ID does not exist.public List<String> getRequestHeaderValues(String headerName)
HttpServerRequestgetRequestHeaderValues in interface HttpServerRequestheaderName - the not null name of the header the values are required for.List of the values set for this header, if the header is not set on the request then
null should be returned.public String getFirstRequestHeaderValue(String headerName)
HttpServerRequestgetFirstRequestHeaderValue in interface HttpServerRequestheaderName - the not null name of the header the value is required for.null should
be returned instead.public SSLSession getSSLSession()
HttpServerRequestSSLSession (if any) that has been established for the connection in use.
Note that even if this is null HttpServerRequest.getPeerCertificates() can still return some certificates, as the certificates
may have been provided to the underlying server via some external mechanism (such as headers).getSSLSession in interface HttpServerRequestSSLSession (if any) that has been established for the connection in use, or null if none
exists.public Certificate[] getPeerCertificates()
HttpServerRequestgetPeerCertificates in interface HttpServerRequestnull if none available.public void noAuthenticationInProgress(HttpServerMechanismsResponder responder)
HttpServerRequestnoAuthenticationInProgress in interface HttpServerRequestresponder - a HttpServerMechanismsResponder that can send a challenge should it be required.public void authenticationInProgress(HttpServerMechanismsResponder responder)
HttpServerRequestauthenticationInProgress in interface HttpServerRequestresponder - a HttpServerMechanismsResponder that can send a challenge should it be required.public void authenticationComplete(HttpServerMechanismsResponder responder)
HttpServerRequestauthenticationComplete in interface HttpServerRequestresponder - a HttpServerMechanismsResponder that can send a response.public void authenticationComplete(HttpServerMechanismsResponder responder, Runnable logoutHandler)
HttpServerRequestNotification 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.
authenticationComplete in interface HttpServerRequestresponder - a HttpServerMechanismsResponder that can send a response.logoutHandler - a Runnable that can handle logoutpublic void authenticationFailed(String message, HttpServerMechanismsResponder responder)
HttpServerRequestauthenticationFailed in interface HttpServerRequestmessage - an error message describing the failure.responder - a HttpServerMechanismsResponder that can send a challenge should it be required.public void badRequest(HttpAuthenticationException failure, HttpServerMechanismsResponder responder)
HttpServerRequestbadRequest in interface HttpServerRequestfailure - an HttpAuthenticationException to describe the error.responder - a HttpServerMechanismsResponder that can send a challenge should it be required.public String getRequestMethod()
HttpServerRequestgetRequestMethod in interface HttpServerRequestString specifying the name of the method with which this request was madepublic URI getRequestURI()
HttpServerRequestgetRequestURI in interface HttpServerRequestpublic String getRequestPath()
HttpServerRequesthttp://my.appserver.com/my-application/path/sub-path this method is going to return /path/sub-path.getRequestPath in interface HttpServerRequestpublic Map<String,List<String>> getParameters()
HttpServerRequestList will contain the values from the query
string followed by the values from the form data.getParameters in interface HttpServerRequestpublic Set<String> getParameterNames()
HttpServerRequestgetParameterNames in interface HttpServerRequestpublic List<String> getParameterValues(String name)
HttpServerRequestList.getParameterValues in interface HttpServerRequestname - the name of the desires parameter values.null if the parameter was not in the request.public String getFirstParameterValue(String name)
HttpServerRequestgetFirstParameterValue in interface HttpServerRequestname - the name of the parameter the first value is required for.null if the parameter is not available.public List<HttpServerCookie> getCookies()
HttpServerRequestList containing all of the HttpServerCookie objects the client sent with this request, or an empty List if no cookies were included in the request.getCookies in interface HttpServerRequestList containing all of the HttpServerCookie objects the client sent with this request, or an empty List if no cookies were included in the request.public InputStream getInputStream()
HttpServerRequestgetInputStream in interface HttpServerRequestpublic InetSocketAddress getSourceAddress()
HttpServerRequestgetSourceAddress in interface HttpServerRequestpublic boolean suspendRequest()
HttpServerRequestsuspendRequest in interface HttpServerRequesttrue if suspending requests is supported, false otherwise.public boolean resumeRequest()
HttpServerRequestresumeRequest in interface HttpServerRequesttrue if resuming requests is supported, false otherwise.Copyright © 2017 JBoss by Red Hat. All rights reserved.