|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.thrift.async.TAsyncMethodCall<T>
T
- public abstract class TAsyncMethodCall<T>
Encapsulates an async method call
Need to generate:
- private void write_args(TProtocol protocol)
- public T getResult() throws
Nested Class Summary
static class
TAsyncMethodCall.State
Field Summary
protected TAsyncClient
client
protected TNonblockingTransport
transport
Constructor Summary
protected
TAsyncMethodCall(TAsyncClient client,
TProtocolFactory protocolFactory,
TNonblockingTransport transport,
AsyncMethodCallback<T> callback,
boolean isOneway)
Method Summary
TAsyncClient
getClient()
protected java.nio.ByteBuffer
getFrameBuffer()
protected long
getSequenceId()
protected long
getStartTime()
protected TAsyncMethodCall.State
getState()
long
getTimeoutTimestamp()
boolean
hasTimeout()
protected boolean
isFinished()
protected void
onError(java.lang.Exception e)
protected void
prepareMethodCall()
Initialize buffers.
protected void
transition(java.nio.channels.SelectionKey key)
Transition to next state, doing whatever work is required.
protected abstract void
write_args(TProtocol protocol)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
transport
protected final TNonblockingTransport transport
client
protected final TAsyncClient client
Constructor Detail
TAsyncMethodCall
protected TAsyncMethodCall(TAsyncClient client,
TProtocolFactory protocolFactory,
TNonblockingTransport transport,
AsyncMethodCallback<T> callback,
boolean isOneway)
Method Detail
getState
protected TAsyncMethodCall.State getState()
isFinished
protected boolean isFinished()
getStartTime
protected long getStartTime()
getSequenceId
protected long getSequenceId()
getClient
public TAsyncClient getClient()
hasTimeout
public boolean hasTimeout()
getTimeoutTimestamp
public long getTimeoutTimestamp()
write_args
protected abstract void write_args(TProtocol protocol)
throws TException
TException
prepareMethodCall
protected void prepareMethodCall()
throws TException
TException
- if buffer initialization fails
getFrameBuffer
protected java.nio.ByteBuffer getFrameBuffer()
transition
protected void transition(java.nio.channels.SelectionKey key)
key
-
onError
protected void onError(java.lang.Exception e)
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD