+
+ if (this.port == 0) {
+ this.port = this.ss.getLocalPort();
+ }
+ }
+
+ /**
+ * The traces handler for this {@link Server}.
+ *
+ * @return the traces handler
+ */
+ public TraceHandler getTraceHandler() {
+ return tracer;
+ }
+
+ /**
+ * The traces handler for this {@link Server}.
+ *
+ * @param tracer
+ * the new traces handler
+ */
+ public void setTraceHandler(TraceHandler tracer) {
+ if (tracer == null) {
+ tracer = new TraceHandler(false, false, false);
+ }
+
+ this.tracer = tracer;
+ }
+
+ /**
+ * Return the assigned port.
+ *
+ * @return the assigned port
+ */
+ public int getPort() {
+ return port;