接口 ServerHttpRequest
- 所有超级接口:
HttpInputMessage,HttpMessage,HttpRequest
public interface ServerHttpRequest extends HttpRequest, HttpInputMessage
Represents a server-side HTTP request.- 从以下版本开始:
- 3.0
- 作者:
- Arjen Poutsma, Rossen Stoyanchev
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 ServerHttpAsyncRequestControlgetAsyncRequestControl(ServerHttpResponse response)Return a control that allows putting the request in asynchronous mode so the response remains open until closed explicitly from the current or another thread.InetSocketAddressgetLocalAddress()Return the address on which the request was received.PrincipalgetPrincipal()Return aPrincipalinstance containing the name of the authenticated user.InetSocketAddressgetRemoteAddress()Return the address of the remote client.从接口继承的方法 org.springframework.http.HttpInputMessage
getBody
从接口继承的方法 org.springframework.http.HttpMessage
getHeaders
从接口继承的方法 org.springframework.http.HttpRequest
getMethod, getURI
方法详细资料
getPrincipal
Principal getPrincipal()
Return aPrincipalinstance containing the name of the authenticated user.If the user has not been authenticated, the method returns
null.
getLocalAddress
InetSocketAddress getLocalAddress()
Return the address on which the request was received.
getRemoteAddress
InetSocketAddress getRemoteAddress()
Return the address of the remote client.
getAsyncRequestControl
ServerHttpAsyncRequestControl getAsyncRequestControl(ServerHttpResponse response)
Return a control that allows putting the request in asynchronous mode so the response remains open until closed explicitly from the current or another thread.