Class HttpServletResponseWrapper
- java.lang.Object
-
- org.springframework.cloud.sleuth.instrument.web.servlet.HttpServletResponseWrapper
-
- All Implemented Interfaces:
HttpResponse,HttpServerResponse,Response
public class HttpServletResponseWrapper extends Object implements HttpServerResponse
This delegates toHttpServletResponsemethods, taking care to portably handlestatusCode().- Since:
- 5.10
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpServerResponsecreate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Throwable caught)Returns the trace representation of a response.Throwableerror()Collection<String>headerNames()HttpServletRequestWrapperrequest()intstatusCode()Objectunwrap()-
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.HttpResponse
header, method, route
-
Methods inherited from interface org.springframework.cloud.sleuth.http.HttpServerResponse
spanKind
-
-
-
-
Method Detail
-
create
public static HttpServerResponse create(@Nullable javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, @Nullable Throwable caught)
Returns the trace representation of a response.- Parameters:
caught- an exception caught serving the request.- Returns:
- wrapped response
-
headerNames
public Collection<String> headerNames()
- Specified by:
headerNamesin interfaceResponse
-
request
@Nullable public HttpServletRequestWrapper request()
- Specified by:
requestin interfaceHttpResponse- Specified by:
requestin interfaceHttpServerResponse- Specified by:
requestin interfaceResponse
-
error
public Throwable error()
- Specified by:
errorin interfaceHttpServerResponse- Specified by:
errorin interfaceResponse
-
statusCode
public int statusCode()
- Specified by:
statusCodein interfaceHttpResponse
-
-