ch.qos.logback.classic.net
Class SSLSocketReceiver

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.classic.net.ReceiverBase
          extended by ch.qos.logback.classic.net.SocketReceiver
              extended by ch.qos.logback.classic.net.SSLSocketReceiver
All Implemented Interfaces:
SocketConnector.ExceptionHandler, SSLComponent, ContextAware, LifeCycle, Runnable

public class SSLSocketReceiver
extends SocketReceiver
implements SSLComponent

A SocketReceiver that supports SSL.

Author:
Carl Harris

Field Summary
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
SSLSocketReceiver()
           
 
Method Summary
protected  SocketFactory getSocketFactory()
          Gets an SocketFactory that produces SSL sockets using an SSLContext that is derived from the remote's configuration.
 SSLConfiguration getSsl()
          Gets the SSL configuration.
 void setSsl(SSLConfiguration ssl)
          Sets the SSL configuration.
protected  boolean shouldStart()
          Determines whether this receiver should start.
 
Methods inherited from class ch.qos.logback.classic.net.SocketReceiver
connectionFailed, createExecutorService, getRunnableTask, newConnector, onStop, run, setAcceptConnectionTimeout, setPort, setReconnectionDelay, setRemoteHost
 
Methods inherited from class ch.qos.logback.classic.net.ReceiverBase
isStarted, start, stop
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLSocketReceiver

public SSLSocketReceiver()
Method Detail

getSocketFactory

protected SocketFactory getSocketFactory()
Gets an SocketFactory that produces SSL sockets using an SSLContext that is derived from the remote's configuration.

Overrides:
getSocketFactory in class SocketReceiver
Returns:
socket factory

shouldStart

protected boolean shouldStart()
Determines whether this receiver should start.

Subclasses will implement this method to do any subclass-specific validation. The subclass's ReceiverBase.getRunnableTask() method will be invoked (and the task returned will be submitted to the executor) if and only if this method returns true

Overrides:
shouldStart in class SocketReceiver
Returns:
flag indicating whether this receiver should start

getSsl

public SSLConfiguration getSsl()
Gets the SSL configuration.

Specified by:
getSsl in interface SSLComponent
Returns:
SSL configuration; if no configuration has been set, a default configuration is returned

setSsl

public void setSsl(SSLConfiguration ssl)
Sets the SSL configuration.

Specified by:
setSsl in interface SSLComponent
Parameters:
ssl - the SSL configuration to set


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