public abstract class ReceiverBase extends ContextAwareBase implements LifeCycle
context
Constructor and Description |
---|
ReceiverBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract 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() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
protected 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 Runnable getRunnableTask()
Copyright © 2005–2021 QOS.ch. All rights reserved.