public abstract class ReceiverBase
extends ch.qos.logback.core.spi.ContextAwareBase
implements ch.qos.logback.core.spi.LifeCycle
| Constructor and Description |
|---|
ReceiverBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.Runnable |
getRunnableTask()
Provides the runnable task this receiver will execute.
|
boolean |
isStarted() |
protected abstract void |
onStop()
Allows a subclass to participate in receiver shutdown.
|
protected abstract boolean |
shouldStart()
Determines whether this receiver should start.
|
void |
start() |
void |
stop() |
public final void start()
start in interface ch.qos.logback.core.spi.LifeCyclepublic final void stop()
stop in interface ch.qos.logback.core.spi.LifeCyclepublic final boolean isStarted()
isStarted in interface ch.qos.logback.core.spi.LifeCycleprotected abstract boolean shouldStart()
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 returns true
protected abstract void onStop()
protected abstract java.lang.Runnable getRunnableTask()