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(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TApplicationException exception) Creates a new instance that contains a ThriftTMessageType.EXCEPTIONmessage.ThriftReply(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TBase<?, ?> result) Creates a new instance that contains a ThriftTMessageType.REPLYmessage. -
Method Summary
Methods inherited from class com.linecorp.armeria.common.thrift.ThriftMessage
header
-
Constructor Details
-
ThriftReply
public ThriftReply(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TBase<?, ?> result) Creates a new instance that contains a ThriftTMessageType.REPLYmessage. -
ThriftReply
public ThriftReply(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TApplicationException exception) Creates a new instance that contains a ThriftTMessageType.EXCEPTIONmessage.
-
-
Method Details
-
isException
public boolean isException()Returnstrueif the type of this reply isTMessageType.EXCEPTION. -
result
public org.apache.thrift.TBase<?,?> result()Returns the result of this reply.- Throws:
IllegalStateException- if the type of this reply is notTMessageType.REPLY
-
exception
public org.apache.thrift.TApplicationException 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
-