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
ConstructorDescriptionThriftReply
(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TApplicationException exception) Creates a new instance that contains a ThriftTMessageType.EXCEPTION
message.ThriftReply
(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TBase<?, ?> result) Creates a new instance that contains a ThriftTMessageType.REPLY
message. -
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.REPLY
message. -
ThriftReply
public ThriftReply(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TApplicationException exception) Creates a new instance that contains a ThriftTMessageType.EXCEPTION
message.
-
-
Method Details
-
isException
public boolean isException()Returnstrue
if 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:
equals
in classThriftMessage
-
hashCode
public int hashCode()- Overrides:
hashCode
in classThriftMessage
-
toString
-