Class SimpleSSLSocketServer

java.lang.Object
java.lang.Thread
ch.qos.logback.classic.net.SimpleSocketServer
ch.qos.logback.classic.net.SimpleSSLSocketServer
All Implemented Interfaces:
Runnable

public class SimpleSSLSocketServer extends SimpleSocketServer
A SimpleSocketServer that supports SSL.
      <b>Usage:</b> java ch.qos.logback.classic.net.ssl.SimpleSSLSocketServer port configFile
 
where port is a port number where the server listens and configFile is an XML configuration file fed to JoranConfigurator. When running the SimpleSSLServerFactory as shown above, it is necessary to configure JSSE system properties using -Dname=value on the command-line when starting the server. In particular, you will probably want/need to configure the following system properties:
  • javax.net.ssl.keyStore
  • javax.net.ssl.keyStorePassword
  • javax.net.ssl.keyStoreType
  • javax.net.ssl.trustStore
  • javax.net.ssl.trustStorePassword
  • javax.net.ssl.trustStoreType

See the Customizing the JSSE in the JSSE Reference Guide for details on how to set these system properties.

Author:
Carl Harris
  • Constructor Details

    • SimpleSSLSocketServer

      public SimpleSSLSocketServer(LoggerContext lc, int port) throws NoSuchAlgorithmException
      Creates a new server using the default SSL context.
      Parameters:
      lc - logger context for received events
      port - port on which the server is to listen
      Throws:
      NoSuchAlgorithmException - if the default SSL context cannot be created
    • SimpleSSLSocketServer

      public SimpleSSLSocketServer(LoggerContext lc, int port, SSLContext sslContext)
      Creates a new server using a custom SSL context.
      Parameters:
      lc - logger context for received events
      port - port on which the server is to listen
      sslContext - custom SSL context
  • Method Details