I want to reuse the most of the logic in the TunnelRequestService, but change a part which obtains connection details from the tunnel request.
Currently, the createTunnel method is large, so to acheive the task I need to override the method and to copy the most of it's contents to the new one, which is not convenient. It would be good to split the method to a set of methods solving separate tasks, such as:
- reading client information,
- creating connected socket,
- creating a tunnel associated with the connected socket.
Then, to solve my task, I only need to override one of them.