public class DefaultFuture extends Object implements ResponseFuture
| Constructor and Description |
|---|
DefaultFuture(Channel channel,
Request request,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel() |
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.
|
public static DefaultFuture getFuture(long id)
public static boolean hasFuture(Channel channel)
public Object get() throws RemotingException
ResponseFutureget in interface ResponseFutureRemotingExceptionpublic Object get(int timeout) throws RemotingException
ResponseFutureget in interface ResponseFuturetimeout - timeout.RemotingExceptionpublic void cancel()
public boolean isDone()
ResponseFutureisDone in interface ResponseFuturepublic void setCallback(ResponseCallback callback)
ResponseFuturesetCallback in interface ResponseFuturepublic Request getRequest()
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.