|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alipay.remoting.rpc.DefaultInvokeFuture
public class DefaultInvokeFuture
The default implementation of InvokeFuture.
| Constructor Summary | |
|---|---|
DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory)
Constructor. |
|
DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory,
InvokeContext invokeContext)
|
|
| Method Summary | |
|---|---|
void |
addTimeout(io.netty.util.Timeout timeout)
Add timeout for the future. |
void |
cancelTimeout()
Cancel the timeout. |
RemotingCommand |
createConnectionClosedResponse(InetSocketAddress responseHost)
Create a remoting command response when connection closed |
void |
executeInvokeCallback()
Execute the callback. |
ClassLoader |
getAppClassLoader()
|
Throwable |
getCause()
Get the cause of exception of the future. |
InvokeCallback |
getInvokeCallback()
Get the application callback of the future. |
InvokeContext |
getInvokeContext()
get invoke context |
byte |
getProtocolCode()
Get the protocol code of command. |
int |
invokeId()
Get the id of the invocation. |
boolean |
isDone()
Whether the future is done. |
void |
putResponse(RemotingCommand response)
Put the response to the future. |
void |
setCause(Throwable cause)
Set the cause if exception caught. |
void |
setInvokeContext(InvokeContext invokeContext)
set invoke context |
void |
tryAsyncExecuteInvokeCallbackAbnormally()
Asynchronous execute the callback abnormally. |
ResponseCommand |
waitResponse()
Wait response with unlimit timeout |
ResponseCommand |
waitResponse(long timeoutMillis)
Wait response with timeout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory)
invokeId - callbackListener - callback - protocol -
public DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory,
InvokeContext invokeContext)
invokeId - callbackListener - callback - protocol - invokeContext - | Method Detail |
|---|
public ResponseCommand waitResponse(long timeoutMillis)
throws InterruptedException
InvokeFuture
waitResponse in interface InvokeFutureInterruptedExceptionInvokeFuture.waitResponse(long)
public ResponseCommand waitResponse()
throws InterruptedException
InvokeFuture
waitResponse in interface InvokeFutureInterruptedExceptionInvokeFuture.waitResponse(long)public RemotingCommand createConnectionClosedResponse(InetSocketAddress responseHost)
InvokeFuture
createConnectionClosedResponse in interface InvokeFuturepublic void putResponse(RemotingCommand response)
InvokeFuture
putResponse in interface InvokeFutureInvokeFuture.putResponse(com.alipay.remoting.RemotingCommand)public boolean isDone()
InvokeFuture
isDone in interface InvokeFutureInvokeFuture.isDone()public ClassLoader getAppClassLoader()
getAppClassLoader in interface InvokeFuturepublic int invokeId()
InvokeFuture
invokeId in interface InvokeFutureInvokeFuture.invokeId()public void executeInvokeCallback()
InvokeFuture
executeInvokeCallback in interface InvokeFuturepublic InvokeCallback getInvokeCallback()
InvokeFuture
getInvokeCallback in interface InvokeFutureInvokeFuture.getInvokeCallback()public void addTimeout(io.netty.util.Timeout timeout)
InvokeFuture
addTimeout in interface InvokeFutureInvokeFuture.addTimeout(io.netty.util.Timeout)public void cancelTimeout()
InvokeFuture
cancelTimeout in interface InvokeFutureInvokeFuture.cancelTimeout()public void setCause(Throwable cause)
InvokeFuture
setCause in interface InvokeFutureInvokeFuture.setCause(java.lang.Throwable)public Throwable getCause()
InvokeFuture
getCause in interface InvokeFutureInvokeFuture.getCause()public byte getProtocolCode()
InvokeFuture
getProtocolCode in interface InvokeFutureInvokeFuture.getProtocolCode()public void setInvokeContext(InvokeContext invokeContext)
InvokeFuture
setInvokeContext in interface InvokeFutureInvokeFuture.getInvokeContext()public InvokeContext getInvokeContext()
InvokeFuture
getInvokeContext in interface InvokeFutureInvokeFuture.setInvokeContext(InvokeContext)public void tryAsyncExecuteInvokeCallbackAbnormally()
InvokeFuture
tryAsyncExecuteInvokeCallbackAbnormally in interface InvokeFutureInvokeFuture.tryAsyncExecuteInvokeCallbackAbnormally()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||