Please sign in to comment.
Adds a connection factory method to the server
Abstracting the creation of connection objects to a protected method is nicer for subclasses. Subclasses can override createConnection() to replace the Connection class. Without this abstraction, the Server and Connection classes are tightly coupled, and the whole lengthy run() method would need to be copy-pasted into the subclass.
- Loading branch information...