- public Server(Version version, int port, boolean ssl) throws IOException {
- this.serverVersion = version;
+ private TraceHandler tracer = new TraceHandler();
+
+ @Deprecated
+ public Server(@SuppressWarnings("unused") Version notUsed, int port,
+ boolean ssl) throws IOException {
+ this(port, ssl);
+ }
+
+ /**
+ * Create a new server that will start listening on the network when
+ * {@link Server#start()} is called.
+ *
+ * @param port
+ * the port to listen on, or 0 to assign any unallocated port
+ * found (which can later on be queried via
+ * {@link Server#getPort()}
+ * @param ssl
+ * use a SSL connection (or not)
+ *
+ * @throws IOException
+ * in case of I/O error
+ */
+ public Server(int port, boolean ssl) throws IOException {
+ this((String) null, port, ssl);
+ }
+
+ /**
+ * Create a new server that will start listening on the network when
+ * {@link Server#start()} is called.
+ *
+ * @param name
+ * the server name (only used for debug info and traces)
+ * @param port
+ * the port to listen on
+ * @param ssl
+ * use a SSL connection (or not)
+ *
+ * @throws IOException
+ * in case of I/O error
+ */
+ public Server(String name, int port, boolean ssl) throws IOException {
+ this.name = name;