public class HttpServiceDownstreamResponseEvent extends ServiceDownstreamResponseEvent
ServiceEvent.Typedata, origin| Constructor and Description |
|---|
HttpServiceDownstreamResponseEvent(java.lang.String origin,
java.lang.String service,
java.lang.String operation,
ServiceDownstreamRequestEvent requestEvent)
Construct a new HttpServiceDownstreamResponseEvent
|
| Modifier and Type | Method and Description |
|---|---|
long |
getContentLength()
Get the content length stored in the Event
|
int |
getStatusCode()
Get the status code stored in the Event
|
HttpServiceDownstreamResponseEvent |
withContentLength(long contentLength)
Add a contentLength to this Event
|
HttpServiceDownstreamResponseEvent |
withStatusCode(int statusCode)
Add a status code to this Event
|
getTypegetRequest, getResponse, getThrown, withResponse, withThrowngetOperation, getService, getServiceEventIdgetData, getOrigin, withDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOperation, getService, getServiceEventIdpublic HttpServiceDownstreamResponseEvent(java.lang.String origin,
java.lang.String service,
java.lang.String operation,
ServiceDownstreamRequestEvent requestEvent)
origin - the origin of the downstream call e.g. 'Web' or 'gRPC'service - the service name e.g. 'WeatherService'operation - the operation name e.g. 'getWeather'requestEvent - the associated request eventpublic HttpServiceDownstreamResponseEvent withStatusCode(int statusCode)
statusCode - the HTTP status codepublic HttpServiceDownstreamResponseEvent withContentLength(long contentLength)
contentLength - the HTTP content-lengthpublic int getStatusCode()
public long getContentLength()