Top Description Fields Constructors Methods
ch.qos.logback.classic.net

public abstract Class ReceiverBase

extends ContextAwareBase
implements LifeCycle
Class Inheritance
All Implemented Interfaces
ch.qos.logback.core.spi.LifeCycle
Known Direct Subclasses
ch.qos.logback.classic.net.SocketReceiver, ch.qos.logback.classic.net.server.ServerSocketReceiver
Imports
ch.qos.logback.core.spi.ContextAwareBase, .LifeCycle

An abstract base for components that receive logging events from a remote peer and log according to local policy
Author
Carl Harris

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
context

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract Runnable

Returns:

runnable task
getRunnableTask
()

Provides the runnable task this receiver will execute.

public final boolean
protected abstract void
onStop()

Allows a subclass to participate in receiver shutdown.

protected abstract boolean

Returns:

flag indicating whether this receiver should start
shouldStart
()

Determines whether this receiver should start.

public final void
public final void
Inherited from ch.qos.logback.core.spi.ContextAwareBase:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextgetDeclaredOrigingetStatusManagersetContext

Field Detail

startedback to summary
private boolean started

Constructor Detail

ReceiverBaseback to summary
public ReceiverBase()

Method Detail

getRunnableTaskback to summary
protected abstract Runnable getRunnableTask()

Provides the runnable task this receiver will execute.

Returns:Runnable

runnable task

isStartedback to summary
public final boolean isStarted()

Implements ch.qos.logback.core.spi.LifeCycle.isStarted.

onStopback to summary
protected abstract void onStop()

Allows a subclass to participate in receiver shutdown.

shouldStartback to summary
protected abstract boolean 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 returns true

Returns:boolean

flag indicating whether this receiver should start

startback to summary
public final void start()

Implements ch.qos.logback.core.spi.LifeCycle.start.

stopback to summary
public final void stop()

Implements ch.qos.logback.core.spi.LifeCycle.stop.