java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.classic.net.ReceiverBase
ch.qos.logback.classic.net.SocketReceiver
ch.qos.logback.classic.net.SSLSocketReceiver
- All Implemented Interfaces:
SocketConnector.ExceptionHandler,SSLComponent,ContextAware,LifeCycle,Runnable
A
SocketReceiver that supports SSL.- Author:
- Carl Harris
-
Field Summary
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SocketFactoryGets anSocketFactorythat produces SSL sockets using anSSLContextthat is derived from the receiver's configuration.getSsl()Gets the SSL configuration.voidsetSsl(SSLConfiguration ssl) Sets the SSL configuration.protected booleanDetermines whether this receiver should start.Methods inherited from class ch.qos.logback.classic.net.SocketReceiver
connectionFailed, getRunnableTask, newConnector, onStop, run, setAcceptConnectionTimeout, setPort, setReconnectionDelay, setRemoteHostMethods inherited from class ch.qos.logback.classic.net.ReceiverBase
isStarted, start, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Constructor Details
-
SSLSocketReceiver
public SSLSocketReceiver()
-
-
Method Details
-
getSocketFactory
Gets anSocketFactorythat produces SSL sockets using anSSLContextthat is derived from the receiver's configuration.- Overrides:
getSocketFactoryin classSocketReceiver- Returns:
- socket factory
-
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 returnstrue- Overrides:
shouldStartin classSocketReceiver- Returns:
- flag indicating whether this receiver should start
-
getSsl
Gets the SSL configuration.- Specified by:
getSslin interfaceSSLComponent- Returns:
- SSL configuration; if no configuration has been set, a default configuration is returned
-
setSsl
Sets the SSL configuration.- Specified by:
setSslin interfaceSSLComponent- Parameters:
ssl- the SSL configuration to set
-