Package org.apache.thrift.async
Class TAsyncClient
java.lang.Object
org.apache.thrift.async.TAsyncClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TAsyncMethodCall<?>protected final TAsyncClientManagerprotected final TProtocolFactoryprotected final TNonblockingTransport -
Constructor Summary
ConstructorsConstructorDescriptionTAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport) TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport, long timeout) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgetError()Get the client's error - returns null if no errorlongbooleanhasError()Is the client in an error state?booleanprotected voidCalled by delegate method when finishedprotected voidCalled by delegate method on error.voidsetTimeout(long timeout)
-
Field Details
-
___protocolFactory
-
___transport
-
___manager
-
___currentMethod
-
-
Constructor Details
-
TAsyncClient
public TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport) -
TAsyncClient
public TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport, long timeout)
-
-
Method Details
-
getProtocolFactory
-
getTimeout
public long getTimeout() -
hasTimeout
public boolean hasTimeout() -
setTimeout
public void setTimeout(long timeout) -
hasError
public boolean hasError()Is the client in an error state?- Returns:
- If client in an error state?
-
getError
Get the client's error - returns null if no error- Returns:
- Get the client's error.
returns null if no error
-
checkReady
protected void checkReady() -
onComplete
protected void onComplete()Called by delegate method when finished -
onError
Called by delegate method on error.- Parameters:
exception- the exception indicating the current error condition.
-