Class HttpServletRequestWrapper
- java.lang.Object
-
- org.springframework.cloud.sleuth.instrument.web.servlet.HttpServletRequestWrapper
-
- All Implemented Interfaces:
HttpRequest,HttpServerRequest,Request
public class HttpServletRequestWrapper extends Object implements HttpServerRequest
Besides delegating toHttpServletRequestmethods, this also parses the remote IP of the client.- Since:
- 5.10
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpServerRequestcreate(javax.servlet.http.HttpServletRequest request)Wraps the request in a tracing representation.Stringheader(String name)Collection<String>headerNames()Stringmethod()Stringpath()Stringroute()Objectunwrap()Stringurl()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.sleuth.http.HttpRequest
remoteIp, remotePort
-
Methods inherited from interface org.springframework.cloud.sleuth.http.HttpServerRequest
getAttribute, setAttribute, spanKind
-
-
-
-
Method Detail
-
create
public static HttpServerRequest create(javax.servlet.http.HttpServletRequest request)
Wraps the request in a tracing representation.- Parameters:
request- http request- Returns:
- wrapped request
-
headerNames
public Collection<String> headerNames()
- Specified by:
headerNamesin interfaceRequest
-
method
public String method()
- Specified by:
methodin interfaceHttpRequest
-
route
public String route()
- Specified by:
routein interfaceHttpRequest
-
path
public String path()
- Specified by:
pathin interfaceHttpRequest
-
url
public String url()
- Specified by:
urlin interfaceHttpRequest
-
header
public String header(String name)
- Specified by:
headerin interfaceHttpRequest
-
-