类 DefaultFuture
- java.lang.Object
-
- com.alibaba.dubbo.remoting.exchange.support.DefaultFuture
-
- 所有已实现的接口:
ResponseFuture
public class DefaultFuture extends Object implements ResponseFuture
DefaultFuture.
-
-
构造器概要
构造器 构造器 说明 DefaultFuture(Channel channel, Request request, int timeout)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcancel()static voidcloseChannel(Channel channel)close a channel when a channel is inactive directly return the unfinished requests.Objectget()get result.Objectget(int timeout)get result with the specified timeout.static DefaultFuturegetFuture(long id)RequestgetRequest()static booleanhasFuture(Channel channel)booleanisDone()check is done.static voidreceived(Channel channel, Response response)static voidsent(Channel channel, Request request)voidsetCallback(ResponseCallback callback)set callback.
-
-
-
方法详细资料
-
getFuture
public static DefaultFuture getFuture(long id)
-
hasFuture
public static boolean hasFuture(Channel channel)
-
closeChannel
public static void closeChannel(Channel channel)
close a channel when a channel is inactive directly return the unfinished requests.- 参数:
channel- channel to close
-
get
public Object get() throws RemotingException
从接口复制的说明:ResponseFutureget result.- 指定者:
get在接口中ResponseFuture- 返回:
- result.
- 抛出:
RemotingException
-
get
public Object get(int timeout) throws RemotingException
从接口复制的说明:ResponseFutureget result with the specified timeout.- 指定者:
get在接口中ResponseFuture- 参数:
timeout- timeout.- 返回:
- result.
- 抛出:
RemotingException
-
cancel
public void cancel()
-
isDone
public boolean isDone()
从接口复制的说明:ResponseFuturecheck is done.- 指定者:
isDone在接口中ResponseFuture- 返回:
- done or not.
-
setCallback
public void setCallback(ResponseCallback callback)
从接口复制的说明:ResponseFutureset callback.- 指定者:
setCallback在接口中ResponseFuture
-
getRequest
public Request getRequest()
-
-