public final class ThriftReply extends ThriftMessage
TBase
or TApplicationException
) and
its header (TMessage
). It is exported to RequestLog.responseContent()
when a Thrift call
is processed.Constructor and Description |
---|
ThriftReply(org.apache.thrift.protocol.TMessage header,
org.apache.thrift.TApplicationException exception)
Creates a new instance that contains a Thrift
TMessageType.EXCEPTION message. |
ThriftReply(org.apache.thrift.protocol.TMessage header,
org.apache.thrift.TBase<?,?> result)
Creates a new instance that contains a Thrift
TMessageType.REPLY message. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
org.apache.thrift.TApplicationException |
exception()
Returns the exception of this reply.
|
int |
hashCode() |
boolean |
isException()
Returns
true if the type of this reply is TMessageType.EXCEPTION . |
org.apache.thrift.TBase<?,?> |
result()
Returns the result of this reply.
|
java.lang.String |
toString() |
header
public ThriftReply(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TBase<?,?> result)
TMessageType.REPLY
message.public ThriftReply(org.apache.thrift.protocol.TMessage header, org.apache.thrift.TApplicationException exception)
TMessageType.EXCEPTION
message.public boolean isException()
true
if the type of this reply is TMessageType.EXCEPTION
.public org.apache.thrift.TBase<?,?> result()
java.lang.IllegalStateException
- if the type of this reply is not TMessageType.REPLY
public org.apache.thrift.TApplicationException exception()
java.lang.IllegalStateException
- if the type of this reply is not TMessageType.EXCEPTION
public boolean equals(java.lang.Object o)
equals
in class ThriftMessage
public int hashCode()
hashCode
in class ThriftMessage
public java.lang.String toString()
toString
in class java.lang.Object