Top Description Methods
org.springframework.http.server

public Interface ServerHttpRequest

extends HttpRequest, HttpInputMessage
Known Direct Implementers
org.springframework.http.server.ServletServerHttpRequest
Imports
java.net.InetSocketAddress, java.security.Principal, org.springframework.http.HttpInputMessage, .HttpRequest, org.springframework.lang.Nullable

Represents a server-side HTTP request.
Authors
Arjen Poutsma, Rossen Stoyanchev
Since
3.0

Method Summary

Modifier and TypeMethod and Description
public 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.

public InetSocketAddress
getLocalAddress()

Return the address on which the request was received.

public Principal
getPrincipal()

Return a java.security.Principal instance containing the name of the authenticated user.

public InetSocketAddress
getRemoteAddress()

Return the address of the remote client.

Inherited from org.springframework.http.HttpInputMessage:
getBody
Inherited from org.springframework.http.HttpRequest:
getMethodgetURI

Method Detail

getAsyncRequestControlback to summary
public 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.

getLocalAddressback to summary
public InetSocketAddress getLocalAddress()

Return the address on which the request was received.

getPrincipalback to summary
public Principal getPrincipal()

Return a java.security.Principal instance containing the name of the authenticated user.

If the user has not been authenticated, the method returns null.

Annotations
@Nullable
getRemoteAddressback to summary
public InetSocketAddress getRemoteAddress()

Return the address of the remote client.