Record Class DownstreamHttpFailure
java.lang.Object
java.lang.Record
io.leandev.appfuse.http.exception.DownstreamHttpFailure
- Record Components:
serviceName- 下游服務名稱statusCode- 下游 HTTP 狀態碼target- 已移除 query string 的下游請求路徑reason- 下游 HTTP reason phrase
-
Constructor Summary
ConstructorsConstructorDescriptionDownstreamHttpFailure(String serviceName, int statusCode, String target, String reason) Creates an instance of aDownstreamHttpFailurerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.Returns the value of theserviceNamerecord component.intReturns the value of thestatusCoderecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DownstreamHttpFailure
Creates an instance of aDownstreamHttpFailurerecord class.- Parameters:
serviceName- the value for theserviceNamerecord componentstatusCode- the value for thestatusCoderecord componenttarget- the value for thetargetrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
serviceName
Returns the value of theserviceNamerecord component.- Returns:
- the value of the
serviceNamerecord component
-
statusCode
public int statusCode()Returns the value of thestatusCoderecord component.- Returns:
- the value of the
statusCoderecord component
-
target
-
reason
-