+
+ /**
+ * This sets the "suggested" port to use. It can only be called once before
+ * starting the HttpServer instance. After the server has actually started the
+ * port is set to the actual port being used and cannot be changed.
+ *
+ * @param port
+ * @return successful change
+ */
+ public static boolean setSuggestedPort(int port)
+ {
+ if (port < 1 || PORT > 0)
+ {
+ return false;
+ }
+ PORT = port;
+ return true;
+ }
+
+ public static int getPort()
+ {
+ return PORT;
+ }