убирание портов в константы внутри кода
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM;
|
||||
import Common.Utils.Vector_;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
@@ -42,6 +43,9 @@ public class Constants {
|
||||
public static final String SMTPHost = "smtp.mail.ru";
|
||||
public static final int SMTPPort = 465;
|
||||
public static final int MailSocketPort = 465;
|
||||
public static final int ComponentsServerPort = 7995;
|
||||
public static final int TestingServerPort = 7998;
|
||||
public static final int SocketTimeout = 5000;
|
||||
//-
|
||||
public static final String ServerAddress = "alex-freenas.ddns.net";
|
||||
public static final String ServerUserName = "testuser";
|
||||
|
||||
@@ -56,22 +56,7 @@ public class MachinesForm extends DataSetControlForm<Machine> {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(),
|
||||
PassCode.AddMachine,
|
||||
PassCode.EditMachine,
|
||||
PassCode.DeleteMachine) {
|
||||
{
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setIcon("/Common/icons/SilverArrowUp.png");
|
||||
setToolTipText("Свернуть");
|
||||
addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("collapseCredentials", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
PassCode.DeleteMachine);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog<Machine, ? extends DialogFields> getDialog() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.Server;
|
||||
import Common.Passes.Pass;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Repository.RepositoryServer;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
@@ -48,7 +49,7 @@ public abstract class ClientPass <S extends RepositoryServer,T> extends Pass<T>
|
||||
return request.Do();
|
||||
}
|
||||
protected boolean SendRequest(ServerCode code_in,String arg_in, Serializable object_in){
|
||||
return SendRequest(code_in,arg_in, object_in, Global.properties.SocketTimeout);
|
||||
return SendRequest(code_in,arg_in, object_in, Constants.SocketTimeout);
|
||||
}
|
||||
protected boolean SendRequest(ServerCode code_in, String arg_in){
|
||||
return SendRequest(code_in,arg_in,null);
|
||||
|
||||
@@ -30,7 +30,7 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
|
||||
return true;
|
||||
}
|
||||
protected int getTimeout() {
|
||||
return Global.properties.SocketTimeout;
|
||||
return Constants.SocketTimeout;
|
||||
}
|
||||
//-
|
||||
protected void connect() throws Exception {
|
||||
|
||||
@@ -112,7 +112,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
}
|
||||
@Override
|
||||
public int getPort() {
|
||||
return Global.properties.ComponentsServerPort;
|
||||
return Constants.ComponentsServerPort;
|
||||
}
|
||||
@Override
|
||||
protected void beforePublishAction(DBObject object) throws Exception {
|
||||
|
||||
@@ -257,7 +257,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//основа
|
||||
@Override
|
||||
public int getPort() {
|
||||
return Global.properties.TestingServerPort;
|
||||
return Constants.TestingServerPort;
|
||||
}
|
||||
@Override
|
||||
protected void startAdditionalThreads() {
|
||||
|
||||
@@ -7,13 +7,6 @@ public class VisualDVMProperties extends Properties {
|
||||
@Expose
|
||||
public _VisualDVM.Mode Mode = _VisualDVM.Mode.Normal;
|
||||
//---
|
||||
@Expose
|
||||
public int ComponentsServerPort = 7995;
|
||||
@Expose
|
||||
public int TestingServerPort = 7998;
|
||||
@Expose
|
||||
public int SocketTimeout = 5000;
|
||||
//--
|
||||
public VisualDVMProperties() {
|
||||
}
|
||||
public VisualDVMProperties(_VisualDVM.Mode mode_in, File file_in) {
|
||||
@@ -23,8 +16,5 @@ public class VisualDVMProperties extends Properties {
|
||||
//---
|
||||
public VisualDVMProperties(VisualDVMProperties src) {
|
||||
Mode = src.Mode;
|
||||
ComponentsServerPort = src.ComponentsServerPort;
|
||||
TestingServerPort = src.TestingServerPort;
|
||||
SocketTimeout = src.SocketTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user