X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fserial%2Fserver%2FServer.java;h=2022469a0296387f90bc5aca40005d4b2981849c;hp=be847d02884ec3112affd0d730d0d364b158e458;hb=f4053377fa15da2f11e82955bfab86e673fa371c;hpb=451f434bd60a354ae5928f5da36b76f24b7b423b diff --git a/src/be/nikiroo/utils/serial/server/Server.java b/src/be/nikiroo/utils/serial/server/Server.java index be847d0..2022469 100644 --- a/src/be/nikiroo/utils/serial/server/Server.java +++ b/src/be/nikiroo/utils/serial/server/Server.java @@ -3,6 +3,7 @@ package be.nikiroo.utils.serial.server; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; +import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; @@ -62,6 +63,11 @@ abstract class Server implements Runnable { * * @throws IOException * in case of I/O error + * @throws UnknownHostException + * if the IP address of the host could not be determined + * @throws IllegalArgumentException + * if the port parameter is outside the specified range of valid + * port values, which is between 0 and 65535, inclusive */ public Server(int port, boolean ssl) throws IOException { this((String) null, port, ssl); @@ -80,6 +86,11 @@ abstract class Server implements Runnable { * * @throws IOException * in case of I/O error + * @throws UnknownHostException + * if the IP address of the host could not be determined + * @throws IllegalArgumentException + * if the port parameter is outside the specified range of valid + * port values, which is between 0 and 65535, inclusive */ public Server(String name, int port, boolean ssl) throws IOException { this.name = name; @@ -180,7 +191,8 @@ abstract class Server implements Runnable { } try { - tracer.trace(name + ": server starting on port " + port); + tracer.trace(name + ": server starting on port " + port + " (" + + (ssl ? "SSL" : "plain text") + ")"); while (started && !exiting) { count(1); @@ -334,6 +346,11 @@ abstract class Server implements Runnable { * * @throws IOException * in case of I/O error + * @throws UnknownHostException + * if the host is not known + * @throws IllegalArgumentException + * if the port parameter is outside the specified range of valid + * port values, which is between 0 and 65535, inclusive */ static Socket createSocket(String host, int port, boolean ssl) throws IOException { @@ -360,6 +377,11 @@ abstract class Server implements Runnable { * * @throws IOException * in case of I/O error + * @throws UnknownHostException + * if the IP address of the host could not be determined + * @throws IllegalArgumentException + * if the port parameter is outside the specified range of valid + * port values, which is between 0 and 65535, inclusive */ static ServerSocket createSocketServer(int port, boolean ssl) throws IOException {