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
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Runnable
Provides the runnable task this receiver will execute.final boolean
protected abstract void
onStop()
Allows a subclass to participate in receiver shutdown.protected abstract boolean
Determines whether this receiver should start.final void
start()
final void
stop()
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
-