Package io.github.astrapi69.net.socket
Class SimpleSocketServer
- java.lang.Object
-
- io.github.astrapi69.net.socket.SimpleSocketServer
-
- All Implemented Interfaces:
java.lang.Runnable
public class SimpleSocketServer extends java.lang.Object implements java.lang.Runnable
The classSimpleSocketServer
.
-
-
Constructor Summary
Constructors Constructor Description SimpleSocketServer(int ports)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractClientHandler
newClientHandler(java.net.Socket socket)
Factory method for creating the newAbstractClientHandler
for handling requests.void
run()
-
-
-
Method Detail
-
newClientHandler
protected AbstractClientHandler newClientHandler(java.net.Socket socket)
Factory method for creating the newAbstractClientHandler
for handling requests. This method is invoked in the run method and can be overridden so users can provide their own version of a new newAbstractClientHandler
for custom handling requests.- Parameters:
socket
- the socket- Returns:
- the new
AbstractClientHandler
for handling requests.
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
-