Package org.apache.thrift.async
Class TAsyncClient
java.lang.Object
org.apache.thrift.async.TAsyncClient
-
Field Summary
Modifier and TypeFieldDescriptionprotected TAsyncMethodCall<?>
protected final TAsyncClientManager
protected final TProtocolFactory
protected final TNonblockingTransport
-
Constructor Summary
ConstructorDescriptionTAsyncClient
(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport) TAsyncClient
(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport, long timeout) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
getError()
Get the client's error - returns null if no errorlong
boolean
hasError()
Is the client in an error state?boolean
protected void
Called by delegate method when finishedprotected void
Called by delegate method on error.void
setTimeout
(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.
-