@Path("3") @GET public void hello3(@Suspended final AsyncResponse asyncResponse, // Inject the Vertx instance @Context Vertx vertx){ System.err.println("Creating client"); HttpClientOptions options = new HttpClientOptions(); options.setSsl(true); options.setTrustAll(true); options.setVerifyHost(false); HttpClient client = vertx.createHttpClient(options); client.getNow(443, "www.google.com", "/robots.txt", resp -> { System.err.println("Got response"); resp.bodyHandler(body -> { System.err.println("Got body"); asyncResponse.resume(Response.ok(body.toString()).build()); }); }); System.err.println("Created client"); }
@GET @Path("/simple") public void asyncGet(@Suspended final AsyncResponse asyncResponse) { new Thread(new Runnable() { @Override public void run() { String result = veryExpensiveOperation(); asyncResponse.resume(result); } private String veryExpensiveOperation() { return new MagicNumber(3) + ""; } }).start(); }
@Path("6") @GET public void hello6(@Suspended final AsyncResponse asyncResponse, // Inject the Vertx instance @Context Vertx vertx){ io.vertx.rxjava.core.Vertx rxVertx = io.vertx.rxjava.core.Vertx.newInstance(vertx); System.err.println("Creating client"); WebClientOptions options = new WebClientOptions(); options.setSsl(true); options.setTrustAll(true); options.setVerifyHost(false); WebClient client = WebClient.create(rxVertx, options); Single<HttpResponse<io.vertx.rxjava.core.buffer.Buffer>> responseHandler = client.get(443, "www.google.com", "/robots.txt").rxSend(); responseHandler.subscribe(body -> { System.err.println("Got body"); asyncResponse.resume(Response.ok(body.body().toString()).build()); }); System.err.println("Created client"); }
@ApiOperation(value = "displays openid config of google async", hidden = true) @GET @Produces(MediaType.APPLICATION_JSON) @Path("/async") public void async(@Suspended final AsyncResponse asyncResponse) throws InterruptedException, ExecutionException { final Future<Response> futureResponseFromClient = jaxrsClient.target("https://accounts.google.com/.well-known/openid-configuration").request().header(javax.ws.rs.core.HttpHeaders.USER_AGENT, "curl/7.55.1").async().get(); final Response responseFromClient = futureResponseFromClient.get(); try { final String object = responseFromClient.readEntity(String.class); asyncResponse.resume(object); } finally { responseFromClient.close(); } }
/** * 根据配置得到所有dashboards */ @GET @Path("dashboard/getdashboards") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") @SuppressWarnings("unchecked") public void getDashboards(@Suspended AsyncResponse response) { CacheManager cacheManager = this.cm; String result = dashboardManagement.getDashboards(cacheManager); Map resultMap = new HashMap(); String codeString = "00"; String msgString = "获取配置信息成功"; if (StringHelper.isEmpty(result)) { codeString = "01"; msgString = "获取配置信息失败或配置信息不存在"; } resultMap.put("code", codeString); resultMap.put("msg", msgString); resultMap.put("data", result); String resultMsg = JSONHelper.toString(resultMap); response.resume(resultMsg); }
@POST @Path("delApp") public void delApp(AppEntity appEntity, @Suspended AsyncResponse response) throws Exception { String id = appEntity.getAppid(); String ctime = df.format(new Date()); Map<String, Object> update = new HashMap<String, Object>(); Map<String, Object> set = new HashMap<String, Object>(); Map<String, Object> modify = new HashMap<String, Object>(); Map<String, Object> where = new HashMap<String, Object>(); where.put("appid", id); modify.put("where", where); set.put("state", 0); set.put("operationtime", ctime); set.put("operationuser", request.getSession(false).getAttribute("apphub.gui.session.login.user.id")); update.put("set", set); modify.put("update", update); Map<String, Object> jsonRequest = createHttpMapRequest(bussinessTypeModify, modify); Map<String, String> callBackInput = createInput(appEntity.getAppid(), null, "delete"); manageHttpAsyncClientPost(manageTypeApp, jsonRequest, new AppHttpCallBack(response, callBackInput)); }
@POST @Path("addApp") public void addApp(AppEntity appEntity, @Suspended AsyncResponse response) throws Exception { Map<String, Object> data = new HashMap<String, Object>(); String appurl = XSSFilter(appEntity.getAppurl()); String id = XSSFilter(appEntity.getAppid()); String configpath = XSSFilter(appEntity.getConfigpath()); String ctime = df.format(new Date()); data.put("appid", id); data.put("appurl", appurl); data.put("configpath", configpath); data.put("state", 1); data.put("createtime", ctime); data.put("operationtime", ctime); data.put("operationuser", request.getSession(false).getAttribute("apphub.gui.session.login.user.id")); Map<String, Object> jsonRequest = createHttpMapRequest(bussinessTypeCreate, data); Map<String, String> callBackInput = createInput(id, appurl, "create"); callBackInput.put("configpath", configpath); manageHttpAsyncClientPost(manageTypeApp, jsonRequest, new AppHttpCallBack(response, callBackInput)); }
@POST @Path("addGroup") public void addGroup(GroupEntity groupEntity, @Suspended AsyncResponse response) throws Exception { String groupId = XSSFilter(groupEntity.getGroupid()); String appIds = XSSFilter(groupEntity.getAppids()); String time = df.format(new Date()); Map<String, Object> data = new HashMap<String, Object>(); data.put("groupid", groupId); data.put("appids", appIds); data.put("state", 1); data.put("createtime", time); data.put("operationtime", time); data.put("operationuser", request.getSession(false).getAttribute("apphub.gui.session.login.user.id")); Map<String, Object> jsonRequest = createHttpMapRequest(bussinessTypeCreate, data); Map<String, String> callBackInput = createInput(groupId, appIds, "create"); manageHttpAsyncClientPost(manageTypeGroup, jsonRequest, new GroupHttpCallBack(response, callBackInput)); }
/** * * 从缓存查询最近1min的MonitorData * * @param data * @param response */ private void loadMonitorDataFromCache(String data, @Suspended AsyncResponse response, String cacheKey) { UAVHttpMessage message = new UAVHttpMessage(); message.setIntent("monitor"); message.putRequest("cache.query.json", data); LoadMonitorDataFromCacheCB callback = new LoadMonitorDataFromCacheCB(); callback.setCacheKey(cacheKey); callback.setData(data); callback.setGodeyeCacheRegion(godeyeCacheRegion); callback.setGodeyeFilterGroupCacheRegion(godeyeFilterGroupCacheRegion); callback.setResponse(response); this.doHttpPost("uav.app.godeye.healthmanager.http.addr", "/hm/cache/q", message, callback); }
/** * 显示当前app的最近实现的日志信息, 默认查询指定时间内的日志记录 * * @return */ @GET @Path("log/q/hm/{appid}") @Deprecated public void getAppLog(@PathParam("appid") String appid, @QueryParam("timespan") String timespan, @QueryParam("psize") String pagesize, @Suspended AsyncResponse response) { try { // 默认:5分钟 long timeLength = DataConvertHelper.toLong(timespan, 1000 * 60 * 5); // 默认不传limit StringBuilder data = new StringBuilder("{\"appid\":\"").append(appid).append("\", \"endtime\":") .append(System.currentTimeMillis() - timeLength); if (pagesize != null && StringHelper.isNumeric(pagesize)) { data.append(",\"psize\":").append(Long.parseLong(pagesize)); } data.append("}"); queryAppLog(data.toString(), response); } catch (Exception e) { logger.err(this, "Error:" + e.getMessage(), e); } }
@SuppressWarnings({ "unchecked" }) @POST @Path("notify/q/stgy/hm") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void noitifyStrategyQuery(String data, @Suspended AsyncResponse response) throws Exception { Map<String, Object> params = JSONHelper.toObject(data, Map.class); int pagesize = (int) params.get("pagesize"); int pageindex = (int) params.get("pageindex"); Map<String, String> strategyMap = new HashMap<String, String>(); strategyMap.put("keys", String.valueOf(params.get("inputValue"))); // 封装http请求数据 UAVHttpMessage message = new UAVHttpMessage(); message.putRequest("body", JSONHelper.toString(strategyMap)); message.setIntent("strategy.query"); NoitifyStrategyQuery callback = new NoitifyStrategyQuery(); callback.setResponse(response); callback.setPageindex(pageindex); callback.setPagesize(pagesize); doHttpPost("uav.app.godeye.notify.strategy.http.addr", "/rtntf/oper", message, callback); }
@POST @Path("notify/get/stgy/hm") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void noitifyStrategyGet(String data, @Suspended AsyncResponse response) throws Exception { Map<String, String> strategyMap = new HashMap<String, String>(); strategyMap.put("keys", data); // 封装http请求数据 UAVHttpMessage message = new UAVHttpMessage(); message.putRequest("body", JSONHelper.toString(strategyMap)); message.setIntent("strategy.query"); NoitifyStrategyGetCB callback = new NoitifyStrategyGetCB(); callback.setResponse(response); doHttpPost("uav.app.godeye.notify.strategy.http.addr", "/rtntf/oper", message, callback); }
@POST @Path("notify/del/stgy/hm") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void noitifyStrategyRemove(String data, @Suspended AsyncResponse response) throws Exception { // 封装http请求数据 UAVHttpMessage message = new UAVHttpMessage(); message.putRequest("body", data); message.setIntent("strategy.remove"); NoitifyStrategyRemoveCB callback = new NoitifyStrategyRemoveCB(); callback.setResponse(response); callback.setData(data); doHttpPost("uav.app.godeye.notify.strategy.http.addr", "/rtntf/oper", message, callback); }
@SuppressWarnings("unchecked") @POST @Path("filter/group/remove") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void groupFilterRemove(String data, @Suspended AsyncResponse response) { Map<String, Object> param = JSONHelper.toObject(data, Map.class); String emailListStr = String.valueOf(param.get("emailListName")); String resultMsg = "{\"code\":\"00\",\"msg\":\"删除成功\"}"; Map<String, String> esistsMap = cm.getHash(godeyeFilterGroupCacheRegion, godeyeFilterGroupCacheRegionKey, emailListStr); if (esistsMap.get(emailListStr) != null) { cm.delHash(godeyeFilterGroupCacheRegion, godeyeFilterGroupCacheRegionKey, emailListStr); } else { resultMsg = "{\"code\":\"01\",\"msg\":\"邮箱组不存在\"}"; } response.resume(resultMsg); }
@POST @Path("updateGroup") public void updateGroup(GroupEntity groupEntity, @Suspended AsyncResponse response) throws Exception { String groupId = XSSFilter(groupEntity.getGroupid()); String appIds = XSSFilter(groupEntity.getAppids()); String time = df.format(new Date()); Map<String, Object> where = new HashMap<String, Object>(); where.put("groupid", groupId); Map<String, Object> cloumns = new HashMap<String, Object>(); cloumns.put("operationtime", time); cloumns.put("operationuser", request.getSession(false).getAttribute("apphub.gui.session.login.user.id")); cloumns.put("appids", appIds); Map<String, Object> set = new HashMap<String, Object>(); set.put("set", cloumns); Map<String, Object> data = new HashMap<String, Object>(); data.put("where", where); data.put("update", set); Map<String, Object> jsonRequest = createHttpMapRequest(bussinessTypeModify, data); Map<String, String> callBackInput = createInput(groupEntity.getGroupid(), appIds, "modify"); manageHttpAsyncClientPost(manageTypeGroup, jsonRequest, new GroupHttpCallBack(response, callBackInput)); }
@POST @Path("loadAllApps") public void loadAllApps(@Suspended AsyncResponse response) { Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> where = new HashMap<String, Object>(); data.put("where", where); HashMap<String, Object> sort = new HashMap<String, Object>(); sort.put("values", "createtime"); sort.put("sortorder", "-1"); data.put("sort", sort); Map<String, Object> jsonRequest = createHttpMapRequest(bussinessTypeQuery, data); Map<String, String> callBackInput = createInput(null, null, "query"); manageHttpAsyncClientPost(manageTypeApp, jsonRequest, new AppHttpCallBack(response, callBackInput)); }
@GET @Path("/withCallback") public void asyncGetWithCallback(@Suspended final AsyncResponse asyncResponse) { asyncResponse.register(new CompletionCallback() { @Override public void onComplete(Throwable throwable) { if (throwable == null) { numberOfSuccessResponses++; } else { numberOfFailures++; lastException = throwable; } } }); new Thread(new Runnable() { @Override public void run() { String result = veryExpensiveOperation(); asyncResponse.resume(result); } private String veryExpensiveOperation() { return new MagicNumber(22) + ""; } }).start(); }
@PUT @Consumes(MediaType.APPLICATION_JSON) public void setCustomers(Flow.Publisher<Customer> customers, @Suspended AsyncResponse response) throws IOException { repository .save(customers) .subscribe(new Flow.Subscriber<>() { @Override public void onSubscribe(Flow.Subscription subscription) { subscription.request(Long.MAX_VALUE); } @Override public void onNext(Integer item) { System.out.println("===== Customer Count: " + item); } @Override public void onError(Throwable throwable) { } @Override public void onComplete() { System.out.println("===== Completed "); response.resume(Response.noContent().build()); } }); }
@Path("4") @GET public void hello4(@Suspended final AsyncResponse asyncResponse, // Inject the Vertx instance @Context Vertx vertx){ System.err.println("Creating client"); HttpClientOptions options = new HttpClientOptions(); options.setSsl(true); options.setTrustAll(true); options.setVerifyHost(false); HttpClient client = vertx.createHttpClient(options); ObservableHandler<HttpClientResponse> responseHandler = RxHelper.observableHandler(); client.getNow(443, "www.google.com", "/robots.txt", responseHandler.toHandler()); ObservableHandler<Buffer> bodyHandler = RxHelper.observableHandler(); responseHandler.subscribe(resp -> { System.err.println("Got response"); resp.bodyHandler(bodyHandler.toHandler()); }); bodyHandler.subscribe(body -> { System.err.println("Got body"); asyncResponse.resume(Response.ok(body.toString()).build()); }); System.err.println("Created client"); }
@Path("5") @GET public void hello5(@Suspended final AsyncResponse asyncResponse, // Inject the Vertx instance @Context Vertx vertx){ io.vertx.rxjava.core.Vertx rxVertx = io.vertx.rxjava.core.Vertx.newInstance(vertx); System.err.println("Creating client"); HttpClientOptions options = new HttpClientOptions(); options.setSsl(true); options.setTrustAll(true); options.setVerifyHost(false); io.vertx.rxjava.core.http.HttpClient client = rxVertx.createHttpClient(options); // DOES NOT WORK: https://github.com/vert-x3/vertx-rx/issues/13 Observable<io.vertx.rxjava.core.http.HttpClientResponse> responseHandler = client.get(443, "www.google.com", "/robots.txt").toObservable(); responseHandler.map(resp -> { System.err.println("Got response"); return resp.toObservable(); }) .subscribe(body -> { System.err.println("Got body"); asyncResponse.resume(Response.ok(body.toString()).build()); }); System.err.println("Created client"); }
@POST public void addition(@Suspended AsyncResponse response, JsonObject input) { response.setTimeout(500, TimeUnit.MILLISECONDS); response.setTimeoutHandler(this::handleTimeout); int a = ofNullable(input.getJsonNumber("a")). map(JsonNumber::intValue). orElseThrow(() -> new LackingParameterException("a")); int b = ofNullable(input.getJsonNumber("b")). map(JsonNumber::intValue). orElseThrow(() -> new LackingParameterException("b")); supplyAsync(() -> computeResult(a, b), mes).thenAccept(response::resume); }
void handleTimeout(AsyncResponse response) { timeoutEscalations.fire("addition is too lazy today"); Response info = Response. status(Response.Status.SERVICE_UNAVAILABLE). header("reason", "too lazy"). build(); response.resume(info); }
/** * Async endpoint which creates local span. * @param asyncResponse holds state of the asynchronous processing */ @GET @Path(REST_ASYNC_LOCAL_SPAN) @Produces(MediaType.TEXT_PLAIN) public void asyncLocalSpan(@Suspended final AsyncResponse asyncResponse) { finishChildSpan(startChildSpan(REST_LOCAL_SPAN)); asyncResponse.resume(Response.ok().build()); }
@ApiOperation(value = "Timeout after 2 seconds") @GET @Path("/st") @Produces(MediaType.TEXT_PLAIN) public void st(@Suspended final AsyncResponse asyncResponse) throws InterruptedException { asyncResponse.setTimeout(1, TimeUnit.SECONDS); Thread.sleep(2000); asyncResponse.resume(Response.ok("hello").build()); }
@ApiOperation(value = "displays hello world after 2 seconds") @GET @Path("/suspend") @Produces(MediaType.TEXT_PLAIN) public void suspend(@Suspended final AsyncResponse asyncResponse) throws InterruptedException { Thread.sleep(2000); asyncResponse.resume(Response.ok("hello").build()); }
@ApiOperation(value = "upload a file") @POST @Path("/upload") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.MULTIPART_FORM_DATA) public void upload( final MultipartFormDataInput input, @Suspended final AsyncResponse asyncResponse) throws IOException { final JsonObject json = new JsonObject(); final Map<String, List<InputPart>> uploadForm = input.getFormDataMap(); final List<InputPart> inputParts = uploadForm.get("uploadedFile"); for (final InputPart inputPart : inputParts) { final MultivaluedMap<String, String> header = inputPart.getHeaders(); final String fileName = getFileName(header); //fromJson the uploaded file to inputstream final InputStream inputStream = inputPart.getBody(InputStream.class, null); int c = 0; while (inputStream.read() != -1) { ++c; } json.add(fileName, new JsonPrimitive(c)); } asyncResponse.resume(json); }
@ApiOperation(value = "displays hello world after a given amount of seconds seconds") @GET @Path("/suspend/{seconds}") @Produces(MediaType.TEXT_PLAIN) public void suspend(@Suspended final AsyncResponse asyncResponse, @PathParam("seconds") final int seconds) throws InterruptedException { Thread.sleep(seconds * 1000L); asyncResponse.resume(Response.ok("hello").build()); }
@GET @Path("hello/{name}") @Produces(MediaType.APPLICATION_JSON) public void sayHello(@Suspended AsyncResponse response, @PathParam("name") String name) { helloService.sayHello(name) .thenAccept(response::resume); }
@POST public void createUserAsync(User user, @Suspended AsyncResponse response) { response.setTimeout(5, TimeUnit.SECONDS); response.setTimeoutHandler(r -> r.resume(Response.status(Response.Status.SERVICE_UNAVAILABLE))); mes.submit(() -> response.resume(createUser(user))); }
@POST public void postTask(@Suspended final AsyncResponse resp) { String taskid = UUID.randomUUID().toString(); ht.setTaskID(taskid); mes.submit(ht); System.out.println("submitted task " + taskid); resp.resume(Response.accepted(taskid).build()); }
/** * 获取主页用户管理信息 * * @return */ @GET @Path("loadUserManageInfo") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void loadUserManageInfo(@Suspended AsyncResponse response) { String result = ""; String userGroup = String .valueOf(request.getSession(false).getAttribute("apphub.gui.session.login.user.group")); Map<String, String> manageGroup = cm.getHashAll("apphub.gui.cache", "manage.group"); // 授权匹配 if (manageGroup.containsKey(userGroup)) { Map<String, String> userManageInfo = new HashMap<String, String>(); String[] userManAppids = manageGroup.get(userGroup).split(","); for (String appid : userManAppids) { Map<String, String> appinfo = cm.getHash("apphub.gui.cache", "manage.app", appid); userManageInfo.putAll(appinfo); } result = JSONHelper.toString(userManageInfo); } logger.info(this, "\r\nloadUserManageInfo\r\nuserGroup:" + userGroup + "\r\nmanageGroup:" + manageGroup + " \r\nresult:" + result); response.resume(result); }
@SuppressWarnings({ "rawtypes", "unchecked" }) public void createDashboards(String configString, String contextPath, HttpServletRequest request, CacheManager cm, AsyncResponse response) { List<Map> configs = JSONHelper.toObjectArray(configString, Map.class); Map<String, Object> valueObjNewMap = getValueObjNewMap(configs); int countFailed = 0; List<String> listFailed = new ArrayList<String>(); for (String appgroupName : valueObjNewMap.keySet()) { String orgId = getOrCreateOrgId(contextPath, appgroupName); Map<String, List> appidNewMap = (Map) valueObjNewMap.get(appgroupName); for (Map.Entry<String, List> entry : appidNewMap.entrySet()) { boolean createFd = callGrafanaDashBoardCreate(entry, request, contextPath, cm, appgroupName, orgId); if (createFd) { countFailed++; String strFailed = appgroupName + "___" + entry.getKey(); listFailed.add(strFailed); } } } Map<String, String> resultMap = new HashMap<String, String>(); String msgFailed = JSONHelper.toString(listFailed); String msgString = "有" + countFailed + "个dashboard创建失败"; resultMap.put("code", "00"); resultMap.put("msg", msgString); resultMap.put("data", msgFailed); String resultMsg = JSONHelper.toString(resultMap); response.resume(resultMsg); }
@SuppressWarnings("unchecked") public void deleteDashboard(String data, CacheManager cm, final AsyncResponse response) { Map<String, String> dataMap = JSONHelper.toObject(data, Map.class); String orgName = dataMap.get("appgroup"); String dashboardName = dataMap.get("appid"); String orgGroupKey = orgName + "___" + dashboardName; Map<String, String> orgIdMap = getRetCodeAndOrgId(orgName); String resultMsg = "{\"code\":\"00\",\"msg\":\"该dashboard所属的org不存在,仅删除配置信息\"}"; if (orgIdMap.get("retCode").equals("404")) { cm.delHash(STORE_REGION_GODCOMPASSCACHE, STORE_KEY_GRAFANACONFIG, orgGroupKey); if (response != null) { response.resume(resultMsg); } } else if (orgIdMap.get("retCode").equals("200")) { Map<String, String> deleteHeader = new HashMap<String, String>(); deleteHeader.put("X-Grafana-Org-Id", orgIdMap.get("orgId")); HttpResponse resDel = grafanaClient.doHttp("delete", "/api/dashboards/db/" + dashboardName.toLowerCase(), null, deleteHeader, null); if (resDel.getStatusLine().getStatusCode() == 200) { resultMsg = "{\"code\":\"00\",\"msg\":\"删除dashboard成功\"}"; cm.delHash(STORE_REGION_GODCOMPASSCACHE, STORE_KEY_GRAFANACONFIG, orgGroupKey); } else if (resDel.getStatusLine().getStatusCode() == 404) { resultMsg = "{\"code\":\"00\",\"msg\":\"该dashboard不存在,仅删除配置信息\"}"; cm.delHash(STORE_REGION_GODCOMPASSCACHE, STORE_KEY_GRAFANACONFIG, orgGroupKey); } if (response != null) { response.resume(resultMsg); } } }
/** * 根据配置创建dashboard */ @POST @Path("dashboard/create") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void createDashboards(String data, @Suspended AsyncResponse response) { dashboardManagement.createDashboards(data, request.getServletContext().getRealPath("/uavapp_godcompass/grafana"), request, this.cm, response); }
/** * 根据配置修改dashboard */ @POST @Path("dashboard/modify") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void modifyDashboard(String data, @Suspended AsyncResponse response) { dashboardManagement.modifyDashboard(data, request.getServletContext().getRealPath("/uavapp_godcompass/grafana"), request, this.cm, response); }
/** * 根据配置删除dashboard */ @POST @Path("dashboard/delete") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void deleteDashboard(String data, @Suspended AsyncResponse response) { dashboardManagement.deleteDashboard(data, this.cm, response); }
@GET @Path("/async") public void asyncPing(@Suspended final AsyncResponse response) { new Thread(() -> response.resume(Response.ok(pongService.getPong()).build()) ).start(); }
/** * 读取profile的某个lazy模式加载的数据 * * @param data * @param response */ @POST @Path("profile/q/detail") @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8") public void loadAppProfileDetail(String data, @Suspended AsyncResponse response) { UAVHttpMessage message = new UAVHttpMessage(data); loadAppProfileListFromHttp(message, response); }