public final class ThriftFunction
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
org.apache.thrift.AsyncProcessFunction<java.lang.Object,org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum>,java.lang.Object> |
asyncFunc()
Returns the
AsyncProcessFunction . |
java.lang.Class<?>[] |
declaredExceptions()
Returns the exceptions declared by this function.
|
java.util.Collection<org.apache.thrift.TFieldIdEnum> |
exceptionFields()
Returns the field that holds the exception.
|
java.lang.Object |
getResult(org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> result)
Converts the specified
result into a Java object. |
boolean |
isAsync()
Returns
true if this function is asynchronous. |
boolean |
isOneWay()
Returns
true if this function is a one-way. |
byte |
messageType()
Returns the type of this function.
|
java.lang.String |
name()
Returns the name of this function.
|
org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> |
newArgs()
Returns a new empty arguments instance.
|
org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> |
newArgs(java.util.List<java.lang.Object> args)
Returns a new arguments instance.
|
org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> |
newResult()
Returns a new empty result instance.
|
java.lang.Class<?> |
serviceType()
Returns the Thrift service interface this function belongs to.
|
boolean |
setException(org.apache.thrift.TBase<?,org.apache.thrift.TFieldIdEnum> result,
java.lang.Throwable cause)
Sets the exception field of the specified
result to the specified cause . |
void |
setSuccess(org.apache.thrift.TBase<?,org.apache.thrift.TFieldIdEnum> result,
java.lang.Object value)
Sets the success field of the specified
result to the specified value . |
org.apache.thrift.TFieldIdEnum |
successField()
Returns the field that holds the successful result.
|
org.apache.thrift.ProcessFunction<java.lang.Object,org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum>> |
syncFunc()
Returns the
ProcessFunction . |
public boolean isOneWay()
true
if this function is a one-way.public boolean isAsync()
true
if this function is asynchronous.public byte messageType()
TMessageType.CALL
or TMessageType.ONEWAY
public org.apache.thrift.ProcessFunction<java.lang.Object,org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum>> syncFunc()
ProcessFunction
.java.lang.ClassCastException
- if this function is asynchronouspublic org.apache.thrift.AsyncProcessFunction<java.lang.Object,org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum>,java.lang.Object> asyncFunc()
AsyncProcessFunction
.java.lang.ClassCastException
- if this function is synchronouspublic java.lang.Class<?> serviceType()
public java.lang.String name()
public org.apache.thrift.TFieldIdEnum successField()
public java.util.Collection<org.apache.thrift.TFieldIdEnum> exceptionFields()
public java.lang.Class<?>[] declaredExceptions()
public org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> newArgs()
public org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> newArgs(java.util.List<java.lang.Object> args)
public org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> newResult()
public void setSuccess(org.apache.thrift.TBase<?,org.apache.thrift.TFieldIdEnum> result, java.lang.Object value)
result
to the specified value
.public java.lang.Object getResult(org.apache.thrift.TBase<org.apache.thrift.TBase<?,?>,org.apache.thrift.TFieldIdEnum> result) throws org.apache.thrift.TException
result
into a Java object.org.apache.thrift.TException
public boolean setException(org.apache.thrift.TBase<?,org.apache.thrift.TFieldIdEnum> result, java.lang.Throwable cause)
result
to the specified cause
.