@Override protected void finalize() throws Throwable { super.finalize(); cleanup(); }
private void extractFiles(final Payload.Inbound inboundPayload) throws Exception { if (inboundPayload == null) { return; } final File uniqueSubdirUnderApplications = chooseTempDirParent(); payloadFilesMgr = new PayloadFilesManager.Temp( uniqueSubdirUnderApplications, report, logger); /* * Extract the files into the temp directory. */ final Map<File, Properties> payloadFiles = payloadFilesMgr.processPartsExtended(inboundPayload); /* * Prepare the map of command options names to corresponding * uploaded files. */ optionNameToFileMap = new MultiMap<String, File>(); for (Map.Entry<File, Properties> e : payloadFiles.entrySet()) { final String optionName = e.getValue().getProperty("data-request-name"); if (optionName != null) { logger.finer("UploadedFilesManager: map " + optionName + " to " + e.getKey()); optionNameToFileMap.add(optionName, e.getKey()); } } }
private void extractFiles(final Payload.Inbound inboundPayload) throws Exception { if (inboundPayload == null) { return; } final File uniqueSubdirUnderApplications = chooseTempDirParent(); payloadFilesMgr = new PayloadFilesManager.Temp( uniqueSubdirUnderApplications, report, logger); /* * Extract the files into the temp directory. */ final Map<File, Properties> payloadFiles = payloadFilesMgr.processPartsExtended(inboundPayload); /* * Prepare the map of command options names to corresponding * uploaded files. */ optionNameToFileMap = new MultiMap<String, File>(); for (Map.Entry<File, Properties> e : payloadFiles.entrySet()) { final String optionName = e.getValue().getProperty("data-request-name"); if (optionName != null) { logger.finer("UploadedFilesManager: map " + optionName + " to " + e.getKey()); optionNameToFileMap.add(optionName, e.getKey()); } } }
private void close() { if (payloadFilesMgr != null) { payloadFilesMgr.cleanup(); } }
@Override protected void finalize() throws Throwable { super.finalize(); cleanup(); }
@Override protected void finalize() throws Throwable { super.finalize(); cleanup(); }
private void close() { if (payloadFilesMgr != null) { payloadFilesMgr.cleanup(); } }