Package org.microproxy.contentviews
Record Class Grpc.Status
java.lang.Object
java.lang.Record
org.microproxy.contentviews.Grpc.Status
- Record Components:
code- the status codemessage- the developer-facing messagedetails- further details
- Enclosing class:
Grpc
public static record Grpc.Status(int code, String message, List<Grpc.Detail> details)
extends Record
A
google.rpc.Status, as servers send it in grpc-status-details-bin.-
Constructor Summary
ConstructorsConstructorDescriptionStatus(int code, String message, List<Grpc.Detail> details) Copies the details. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.codeName()Returns the code's name, ornullfor an unknown code.details()Returns the value of thedetailsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.byte[]Returns the status serialized as agoogle.rpc.Statusmessage.final StringtoString()Returns a string representation of this record class.Returns the value of agrpc-status-details-binfield carrying this status.
-
Constructor Details
-
Status
Copies the details.- Parameters:
code- the status codemessage- the messagedetails- the details
-
-
Method Details
-
codeName
Returns the code's name, ornullfor an unknown code.- Returns:
- the code's name, or
nullfor an unknown code
-
toByteArray
public byte[] toByteArray()Returns the status serialized as agoogle.rpc.Statusmessage.- Returns:
- the status serialized as a
google.rpc.Statusmessage
-
toTrailer
Returns the value of agrpc-status-details-binfield carrying this status.- Returns:
- the value of a
grpc-status-details-binfield carrying this status
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
code
public int code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
details
Returns the value of thedetailsrecord component.- Returns:
- the value of the
detailsrecord component
-