ch.qos.logback.classic.net
Class SimpleSSLSocketServer

java.lang.Object
  extended by java.lang.Thread
      extended by ch.qos.logback.classic.net.SimpleSocketServer
          extended by 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:

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

Author:
Carl Harris

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SimpleSSLSocketServer(LoggerContext lc, int port)
          Creates a new server using the default SSL context.
SimpleSSLSocketServer(LoggerContext lc, int port, SSLContext sslContext)
          Creates a new server using a custom SSL context.
 
Method Summary
protected  ServerSocketFactory getServerSocketFactory()
          Gets the platform default ServerSocketFactory.
static void main(String[] argv)
           
 
Methods inherited from class ch.qos.logback.classic.net.SimpleSocketServer
close, configureLC, doMain, getLatch, isClosed, run, socketNodeClosing
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception

getServerSocketFactory

protected ServerSocketFactory getServerSocketFactory()
Description copied from class: SimpleSocketServer
Gets the platform default ServerSocketFactory.

Subclasses may override to provide a custom server socket factory.

Overrides:
getServerSocketFactory in class SimpleSocketServer


Copyright © 2005-2013 QOS.ch. All Rights Reserved.