Package org.apache.thrift.async
Class TAsyncClient
- java.lang.Object
-
- org.apache.thrift.async.TAsyncClient
-
public abstract class TAsyncClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected TAsyncMethodCall___currentMethodprotected TAsyncClientManager___managerprotected TProtocolFactory___protocolFactoryprotected TNonblockingTransport___transport
-
Constructor Summary
Constructors Constructor Description TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport)TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport, long timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckReady()java.lang.ExceptiongetError()Get the client's error - returns null if no errorTProtocolFactorygetProtocolFactory()longgetTimeout()booleanhasError()Is the client in an error state?booleanhasTimeout()protected voidonComplete()Called by delegate method when finishedprotected voidonError(java.lang.Exception exception)Called by delegate method on error.voidsetTimeout(long timeout)
-
-
-
Field Detail
-
___protocolFactory
protected final TProtocolFactory ___protocolFactory
-
___transport
protected final TNonblockingTransport ___transport
-
___manager
protected final TAsyncClientManager ___manager
-
___currentMethod
protected TAsyncMethodCall ___currentMethod
-
-
Constructor Detail
-
TAsyncClient
public TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport)
-
TAsyncClient
public TAsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager manager, TNonblockingTransport transport, long timeout)
-
-
Method Detail
-
getProtocolFactory
public TProtocolFactory 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
public java.lang.Exception 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
protected void onError(java.lang.Exception exception)
Called by delegate method on error.- Parameters:
exception- the exception indicating the current error condition.
-
-