Top Description Fields Constructors Methods
ch.qos.logback.classic.net

public Class SimpleSSLSocketServer

extends SimpleSocketServer
Class Inheritance
Imports
java.security.NoSuchAlgorithmException, javax.net.ServerSocketFactory, javax.net.ssl.SSLContext, ch.qos.logback.classic.LoggerContext, ch.qos.logback.classic.joran.JoranConfigurator, ch.qos.logback.core.net.ssl.ConfigurableSSLServerSocketFactory, .SSLParametersConfiguration

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

Field Summary

Modifier and TypeField and Description
private final ServerSocketFactory
Inherited from ch.qos.logback.classic.net.SimpleSocketServer:
logger

Constructor Summary

AccessConstructor and Description
public
SimpleSSLSocketServer(LoggerContext
logger context for received events
lc
,
int
port on which the server is to listen
port
)

Creates a new server using the default SSL context.

public
SimpleSSLSocketServer(LoggerContext
logger context for received events
lc
,
int
port on which the server is to listen
port
,
SSLContext
custom SSL context
sslContext
)

Creates a new server using a custom SSL context.

Method Summary

Modifier and TypeMethod and Description
protected ServerSocketFactory
public static void
Inherited from ch.qos.logback.classic.net.SimpleSocketServer:
closeconfigureLCdoMaingetClientThreadNamegetLatchgetServerThreadNameisClosedparsePortNumberrunsetLatchsignalAlmostReadinesssocketNodeClosingusage

Field Detail

socketFactoryback to summary
private final ServerSocketFactory socketFactory

Constructor Detail

SimpleSSLSocketServerback to summary
public SimpleSSLSocketServer(LoggerContext lc, int port) throws NoSuchAlgorithmException

Creates a new server using the default SSL context.

Parameters
lc:LoggerContext

logger context for received events

port:int

port on which the server is to listen

Exceptions
NoSuchAlgorithmException:
if the default SSL context cannot be created
SimpleSSLSocketServerback to summary
public SimpleSSLSocketServer(LoggerContext lc, int port, SSLContext sslContext)

Creates a new server using a custom SSL context.

Parameters
lc:LoggerContext

logger context for received events

port:int

port on which the server is to listen

sslContext:SSLContext

custom SSL context

Method Detail

getServerSocketFactoryback to summary
protected ServerSocketFactory getServerSocketFactory()

Overrides ch.qos.logback.classic.net.SimpleSocketServer.getServerSocketFactory.

Doc from ch.qos.logback.classic.net.SimpleSocketServer.getServerSocketFactory.

Gets the platform default ServerSocketFactory.

Subclasses may override to provide a custom server socket factory.

Annotations
@Override
mainback to summary
public static void main(String[] argv) throws Exception

Hides ch.qos.logback.classic.net.SimpleSocketServer.main.