java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.classic.net.ReceiverBase
- All Implemented Interfaces:
ContextAware,LifeCycle
- Direct Known Subclasses:
ServerSocketReceiver,SocketReceiver
An abstract base for components that receive logging events from a remote
peer and log according to local policy
- Author:
- Carl Harris
-
Field Summary
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract RunnableProvides the runnable task this receiver will execute.final booleanprotected abstract voidonStop()Allows a subclass to participate in receiver shutdown.protected abstract booleanDetermines whether this receiver should start.final voidstart()final voidstop()Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Constructor Details
-
ReceiverBase
public ReceiverBase()
-
-
Method Details
-
start
-
stop
-
isStarted
-
shouldStart
Determines whether this receiver should start.Subclasses will implement this method to do any subclass-specific validation. The subclass's
getRunnableTask()method will be invoked (and the task returned will be submitted to the executor) if and only if this method returnstrue- Returns:
- flag indicating whether this receiver should start
-
onStop
Allows a subclass to participate in receiver shutdown. -
getRunnableTask
Provides the runnable task this receiver will execute.- Returns:
- runnable task
-