public class HSFResponseFuture extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static ThreadLocal<Future<Object>> |
future |
static ThreadLocal<HSFFutureListener> |
listener |
| 构造器和说明 |
|---|
HSFResponseFuture() |
| 限定符和类型 | 方法和说明 |
|---|---|
static HSFFuture |
getFuture() |
static Object |
getResponse(long timeout)
获取远程对象的结果。
|
static void |
setFuture(Future<Object> future)
设置Future方式的调用,不需要应用调用
|
static void |
setFutureListener(HSFFutureListener listener) |
public static ThreadLocal<Future<Object>> future
public static ThreadLocal<HSFFutureListener> listener
public static Object getResponse(long timeout) throws HSFException, InterruptedException
如果指定的时间用完但还没有收到响应,则返回
timeout - 超时时间HSFExceptionInterruptedExceptionpublic static HSFFuture getFuture() throws HSFException
HSFExceptionpublic static void setFutureListener(HSFFutureListener listener)
Copyright © 2018. All rights reserved.