Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.10
    • Fix Version/s: 1.0.11
    • Labels:
      None

      Description

      In SimpleSocketServer.run, the ServerSocket constructor is invoked directly to create a new server socket. This makes it difficult for a subclass to have any influence over the creation of server sockets (e.g. to use an SSL server socket).

      If SimpleSocketServer declared a method such as this:

      protected ServerSocketFactory getServerSocketFactory() {
      return ServerSocketFactory.getDefault()
      }

      and used it in the run() implementation...

      ...
      serverSocket = getServerSocketFactory().createSocket(port);
      ...

      then a subclass could override it with, for example, an appropriately configured SSLServerSocketFactory...

      public class MySSLSimpleSocketServer extends SimpleSocketServer {
      ...
      protected ServerSocketFactory getServerSocketFactory()

      { return mySslContext.getServerSocketFactory(); }

      ...
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                logback-dev Logback dev list
                Reporter:
                ceharris Carl Harris
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: