类 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)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 void
cancel()
static void
closeChannel(Channel channel)
close a channel when a channel is inactive directly return the unfinished requests.Object
get()
get result.Object
get(int timeout)
get result with the specified timeout.static DefaultFuture
getFuture(long id)
Request
getRequest()
static boolean
hasFuture(Channel channel)
boolean
isDone()
check is done.static void
received(Channel channel, Response response)
static void
sent(Channel channel, Request request)
void
setCallback(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
从接口复制的说明:ResponseFuture
get result.- 指定者:
get
在接口中ResponseFuture
- 返回:
- result.
- 抛出:
RemotingException
-
get
public Object get(int timeout) throws RemotingException
从接口复制的说明:ResponseFuture
get result with the specified timeout.- 指定者:
get
在接口中ResponseFuture
- 参数:
timeout
- timeout.- 返回:
- result.
- 抛出:
RemotingException
-
cancel
public void cancel()
-
isDone
public boolean isDone()
从接口复制的说明:ResponseFuture
check is done.- 指定者:
isDone
在接口中ResponseFuture
- 返回:
- done or not.
-
setCallback
public void setCallback(ResponseCallback callback)
从接口复制的说明:ResponseFuture
set callback.- 指定者:
setCallback
在接口中ResponseFuture
-
getRequest
public Request getRequest()
-
-