Moved SimpleAutoResponder#setPort & SimpleAutoResponder#getPort to the bottom of the file
This commit is contained in:
parent
578ac9e5e9
commit
5b7e4e3de0
@ -12,6 +12,19 @@ public class SimpleAutoResponder {
|
||||
|
||||
private int port = 8025;
|
||||
|
||||
/**
|
||||
* Starts the auto responder server
|
||||
*
|
||||
* @throws ResponderException Throws whenever the webserver could not start
|
||||
*/
|
||||
public void start() throws ResponderException {
|
||||
try {
|
||||
httpServer = HttpServer.create(new InetSocketAddress(port), 0);
|
||||
} catch (IOException e) {
|
||||
throw new ResponderException("Could not open a webserver under the port " + port + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the port of the webserver
|
||||
*
|
||||
@ -32,17 +45,4 @@ public class SimpleAutoResponder {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the auto responder server
|
||||
*
|
||||
* @throws ResponderException Throws whenever the webserver could not start
|
||||
*/
|
||||
public void start() throws ResponderException {
|
||||
try {
|
||||
httpServer = HttpServer.create(new InetSocketAddress(port), 0);
|
||||
} catch (IOException e) {
|
||||
throw new ResponderException("Could not open a webserver under the port " + port + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user