diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d7ed6829..2030a481 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -7,9 +7,9 @@ + - - + diff --git a/properties b/properties index fff10d8d..81f2dc41 100644 --- a/properties +++ b/properties @@ -18,7 +18,7 @@ "collapseProjectTrees": false, "EditorFontSize": 17, "ComponentsWindowWidth": 929, - "ComponentsWindowHeight": 300, + "ComponentsWindowHeight": 250, "Kernels": 8, "LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe", "CheckTestingIntervalSeconds": 10, diff --git a/src/_VisualDVM/Passes/All/Email.java b/src/_VisualDVM/Passes/All/Email.java index 4121a246..48dd415e 100644 --- a/src/_VisualDVM/Passes/All/Email.java +++ b/src/_VisualDVM/Passes/All/Email.java @@ -2,11 +2,20 @@ package _VisualDVM.Passes.All; import _VisualDVM.Passes.Server.ComponentsServerPass; import _VisualDVM.Repository.EmailMessage; import _VisualDVM.Repository.Server.ServerCode; +import _VisualDVM.Repository.Server.ServerExchangeUnit_2021; import java.util.Vector; public class Email extends ComponentsServerPass { Vector recipients; @Override + protected boolean requestNeedsAnimation() { + return false; + } + @Override + protected boolean needsAnimation() { + return true; + } + @Override protected boolean canStart(Object... args) throws Exception { recipients = null; if (args.length<=1) { @@ -28,7 +37,12 @@ public class Email extends ComponentsServerPass { } @Override protected void body() throws Exception { - SendRequest(ServerCode.EmailBroadcast, String.join("\n",recipients), target); + int i = 0; + for (String address : recipients) { + ShowProgress(recipients.size(), i, true); + SendRequest(ServerCode.Email, address, target,0); + ++i; + } } } diff --git a/src/_VisualDVM/Repository/Component/Visualiser.java b/src/_VisualDVM/Repository/Component/Visualiser.java index eef4b4e6..ede57649 100644 --- a/src/_VisualDVM/Repository/Component/Visualiser.java +++ b/src/_VisualDVM/Repository/Component/Visualiser.java @@ -62,7 +62,7 @@ public class Visualiser extends Component { //http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html @Override public void GetVersionInfo() { - version = 1143; + version = 1144; String pattern = "MMM dd yyyy HH:mm:ss"; DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH); date_text = df.format(getClassBuildTime()); diff --git a/src/_VisualDVM/Repository/RepositoryServer.java b/src/_VisualDVM/Repository/RepositoryServer.java index 28263b33..1977c164 100644 --- a/src/_VisualDVM/Repository/RepositoryServer.java +++ b/src/_VisualDVM/Repository/RepositoryServer.java @@ -103,9 +103,9 @@ public abstract class RepositoryServer { props.put("mail.smtp.port", String.valueOf(Constants.SMTPPort)); props.put("mail.smtp.socketFactory.port", String.valueOf(Constants.MailSocketPort)); props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); - props.put("mail.smtp.connectiontimeout", String.valueOf(Global.properties.SocketTimeout)); - props.put("mail.smtp.timeout", String.valueOf(Global.properties.SocketTimeout)); - props.put("mail.smtp.writetimeout", String.valueOf(Global.properties.SocketTimeout)); + props.put("mail.smtp.connectiontimeout", String.valueOf(15000)); + props.put("mail.smtp.timeout", String.valueOf(15000)); + props.put("mail.smtp.writetimeout", String.valueOf(15000)); //------------------------------ LinkedHashMap innerFiles = new LinkedHashMap<>(); for (String aName : message_in.files.keySet()) { @@ -123,9 +123,6 @@ public abstract class RepositoryServer { Constants.MailPassword); } }); - boolean done = false; - int attempts = 5; - while (!done && (attempts > 0)) { try { MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress(Constants.MailAddress)); @@ -144,15 +141,11 @@ public abstract class RepositoryServer { } message.setContent(multipart); Transport.send(message); - done = true; } catch (Exception ex) { System.out.println("Исключение во время отправки сообщения абоненту " + Utils_.Brackets(address_in)); ex.printStackTrace(); Utils_.sleep(1000); - } finally { - attempts--; } - } } catch (Exception ex) { System.out.println("Исключение во время выполнения рассылки."); ex.printStackTrace(); @@ -223,9 +216,6 @@ public abstract class RepositoryServer { Email((EmailMessage) request.object, request.arg); response = new ServerExchangeUnit_2021(ServerCode.OK); break; - case EmailBroadcast: - EmailBroadcast(); - break; // // case CheckObjectExistense: @@ -326,15 +316,6 @@ public abstract class RepositoryServer { } } } - private void EmailBroadcast() throws Exception { - String[] packed = request.arg.split("\n"); - for (String address : packed) { - if (!address.isEmpty()) { - Email((EmailMessage) request.object, address); - } - } - response = new ServerExchangeUnit_2021(ServerCode.OK); - } //-- protected Database getDefaultDatabase() { return db;