产品概述
功能介绍
产品优势
应用场景
基本概念
CompletableFuture<XXX>)均一样。//生成 SMHCollectionFuture 示例Context context;SMHCollectionFuture smh = new SMHCollection(context,new MySMHSimpleUser()).future();//获取目录列表CompletableFuture<DirectoryContents> cf = smh.list(1, 50);//阻塞获取结果// try {// DirectoryContents directoryContents = cf.get();// } catch (Throwable e){// e.printStackTrace();// }//异步获取结果// 如果执行成功:cf.thenApply((result) -> {DirectoryContents directoryContents = result;return result;});// 如果执行异常:cf.exceptionally((e) -> {e.printStackTrace();return null;});
文档反馈