public class RestartableServer extends Object
Constructor and Description |
---|
RestartableServer(int port,
int maxSocket,
int maxJob)
Instantiates a
RestartableServer . |
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(RestEndpoint endPoint)
Add the endpoint.
|
void |
pause()
Pause the server.
|
void |
start()
Starts the server.
|
void |
stop()
Stops the server.
|
public RestartableServer(int port, int maxSocket, int maxJob)
RestartableServer
.port
- the port to listen.maxSocket
- the maximum socket.maxJob
- the maxiumum of simultaneous jobs.public void addEndpoint(RestEndpoint endPoint)
endPoint
- the endpoint.public void pause()
public void start() throws IOException
IOException
- if it could not creat the server.public void stop()