class RpcFuture implements AsyncAwareFuture<T> {

    public void handleResponse(Response response) {
        handleConnection(response);
        // invoke the chain of interceptors when async scene
        if (isAsync() && CollectionUtils.isNotEmpty(interceptors)) {
            int length = interceptors.size();
            for (int i = length - 1; i >= 0; i--) {
                interceptors.get(i).handleResponse(response);
            }
        }

        if (isAsync()) {
            setRpcContext();
            if (response == null) {
                callback.fail(new RpcException(RpcException.SERVICE_EXCEPTION, "internal error"));
            } else if (response.getResult() != null) {
                callback.success((T) response.getResult());
            } else {
                callback.fail(response.getException());
            }
        }
    }

    public  RpcFuture();
    public  RpcFuture(long correlationId);

}