Class ThriftReply
java.lang.Object
com.linecorp.armeria.common.thrift.ThriftMessage
com.linecorp.armeria.common.thrift.ThriftReply
A container of a Thrift reply or exception object (
TBase or TApplicationException) and
its header (TMessage). It is exported to RequestLog.responseContent() when a Thrift call
is processed.-
Constructor Summary
ConstructorsConstructorDescriptionThriftReply(TMessage header, TApplicationException exception) Creates a new instance that contains a ThriftTMessageType.EXCEPTIONmessage.ThriftReply(TMessage header, TBase<?, ?> result) Creates a new instance that contains a ThriftTMessageType.REPLYmessage. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the exception of this reply.inthashCode()booleanReturnstrueif the type of this reply isTMessageType.EXCEPTION.TBase<?,?> result()Returns the result of this reply.toString()Methods inherited from class com.linecorp.armeria.common.thrift.ThriftMessage
header
-
Constructor Details
-
ThriftReply
Creates a new instance that contains a ThriftTMessageType.REPLYmessage. -
ThriftReply
Creates a new instance that contains a ThriftTMessageType.EXCEPTIONmessage.
-
-
Method Details
-
isException
public boolean isException()Returnstrueif the type of this reply isTMessageType.EXCEPTION. -
result
Returns the result of this reply.- Throws:
IllegalStateException- if the type of this reply is notTMessageType.REPLY
-
exception
Returns the exception of this reply.- Throws:
IllegalStateException- if the type of this reply is notTMessageType.EXCEPTION
-
equals
- Overrides:
equalsin classThriftMessage
-
hashCode
public int hashCode()- Overrides:
hashCodein classThriftMessage
-
toString
-