package art.servers;
|
|
|
import art.library.gui.FlatGUI;
|
import art.servers.colorsserver.controller.ListenerImplementation;
|
import art.servers.colorsserver.Shared;
|
import art.library.gui.flat.FlatDialog;
|
import art.library.interop.serialization.Serialization;
|
import art.library.utils.licence.Licence;
|
import art.servers.colorsserver.M.protocol.Test;
|
import art.servers.colorsserver.configuration.Configuration;
|
import art.servers.colorsserver.configuration.ConfigurationDetail;
|
import java.io.File;
|
import java.io.PrintWriter;
|
import java.io.StringWriter;
|
|
|
public class ColorsServer extends art.servers.Server
|
{
|
public static boolean ACTIVATE_REALTIME = false;
|
public static boolean REQUEST_RTAC = true;
|
public static boolean LOG_TIME = false;
|
public static boolean TEST_SPTP = false;
|
public static boolean LOG_TRACE = false;
|
|
|
public static void main(String[] args)
|
{
|
try
|
{
|
System.out.println(Licence.encrypt("Administrador"));
|
System.out.println(Licence.encrypt("QzU8F84taY"));
|
System.out.println(Licence.encrypt("test"));
|
System.out.println(Licence.decrypt("/cmGs+Vrfw4T6TjWHFiy7w=="));
|
System.out.println(Licence.decrypt("A/zYtigVU7uJN/pJjR1y0A=="));
|
System.out.println(Licence.decrypt("CINfOIVH0S3ZKSnaOzMFxA=="));
|
System.out.println(Licence.decrypt("EUyMXgmqkpDyc9ff8Iosqw=="));
|
System.out.println(Licence.decrypt("NyiG//i7loPFfdUoO9BFuA=="));
|
System.out.println(Licence.decrypt("PuYPheNKkDV1SHy+VYG8pA=="));
|
System.out.println(Licence.decrypt("Uv8YL6HJw/7F8gf9gqYDeg=="));
|
System.out.println(Licence.decrypt("wk33rftqsvc9pLhGnhnZSQ=="));
|
|
System.out.println("");
|
System.out.println("");
|
System.out.println(Licence.decrypt("A/zYtigVU7uJN/pJjR1y0A==") + " / " + Licence.decrypt("9u5q38/PaQdCyBcwpCAdgA=="));
|
System.out.println(Licence.decrypt("CINfOIVH0S3ZKSnaOzMFxA==") + " / " + Licence.decrypt("CINfOIVH0S3ZKSnaOzMFxA=="));
|
System.out.println(Licence.decrypt("PuYPheNKkDV1SHy+VYG8pA==") + " / " + Licence.decrypt("PuYPheNKkDV1SHy+VYG8pA=="));
|
System.out.println(Licence.decrypt("Uv8YL6HJw/7F8gf9gqYDeg==") + " / " + Licence.decrypt("Uv8YL6HJw/7F8gf9gqYDeg=="));
|
System.out.println(Licence.decrypt("/cmGs+Vrfw4T6TjWHFiy7w==") + " / " + Licence.decrypt("/cmGs+Vrfw4T6TjWHFiy7w=="));
|
System.out.println(Licence.decrypt("EUyMXgmqkpDyc9ff8Iosqw==") + " / " + Licence.decrypt("EUyMXgmqkpDyc9ff8Iosqw=="));
|
System.out.println(Licence.decrypt("P6R0b6e9H8PBxsBGhRxQ6Q==") + " / " + Licence.decrypt("EUyMXgmqkpDyc9ff8Iosqw=="));
|
|
}
|
catch (Exception e)
|
{
|
|
}
|
|
try
|
{
|
ACTIVATE_REALTIME = existParameter(args, "-activaterealtime");
|
REQUEST_RTAC = !existParameter(args, "-nortac");
|
LOG_TIME = existParameter(args, "-logtime");
|
TEST_SPTP = existParameter(args, "-testsptp");
|
LOG_TRACE = existParameter(args, "-logtrace");
|
if (existParameter(args, "-ipcontrollerlog") == true)
|
{
|
Shared.ipcontrollerlog = getParameter(args, "-ipcontrollerlog");
|
}
|
|
if (existParameter(args, "-portcontrollerlog") == true)
|
{
|
Shared.portcontrollerlog = Integer.parseInt(getParameter(args, "-portcontrollerlog"));
|
}
|
|
if (existParameter(args, "-reboot"))
|
{
|
try{new Test().start();} catch (Exception e){};
|
}
|
|
FlatGUI.initialise();
|
Shared.setApplicationCode("FsEhD8Bp4LqdRHtbrg5ykzmqwmtDQP3m");
|
Shared.setApplicationName("art.servers.colorsserver");
|
preinitialise(args, Configuration.class);
|
Shared.model = new art.servers.colorsserver.Model(Shared.configuration);
|
postinitialise(args);
|
ListenerImplementation listenerImplementation = new ListenerImplementation();
|
if (Shared.controllerListenerHttps != null) Shared.controllerListenerHttps.setListenerImplementation(listenerImplementation);
|
if (Shared.controllerListener != null) Shared.controllerListener.setListenerImplementation(listenerImplementation);
|
|
try
|
{
|
// Configuration detail
|
ConfigurationDetail configurationDetail = (ConfigurationDetail)Serialization.deserialize(ConfigurationDetail.class, new File(Shared.getApplicationName() + ".detail.json"));
|
((Configuration)Shared.configuration).detail = configurationDetail;
|
}
|
catch (Exception e)
|
{
|
e.printStackTrace();
|
}
|
|
Shared.createControllers();
|
}
|
catch (Exception e)
|
{
|
e.printStackTrace();
|
StringWriter sw = new StringWriter();
|
e.printStackTrace(new PrintWriter(sw));
|
FlatDialog.showDialog(null, Shared.getMessage("Error"), e.getMessage() + "\n\n" + sw.toString(), true, FlatDialog.DIALOG_INFORMATION);
|
System.exit(0);
|
}
|
}
|
|
}
|