public abstract class AbstractFilterTask extends AbstractMessageTask
Modifier and Type | Field and Description |
---|---|
protected FilterStage[] |
arrayCurrentFilterStage_
FilterStages to process.
|
protected static FilterStage[] |
EMPTY_FILTERSTAGE
empty default value for field arrayCurrentFilterStage_.
|
logger_
Modifier | Constructor and Description |
---|---|
protected |
AbstractFilterTask(TaskFactory taskFactory,
TaskExecutor taskExecutor) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFilterStage(FilterStage s) |
protected void |
addFilterStage(List s) |
void |
clearFilterStageToBeProcessed()
clear the result of the previous run.
|
protected abstract void |
doFilter() |
void |
doWork()
Override this Method in Subclasses to do the "real work".
|
FilterStage[] |
getFilterStageToBeProcessed()
get the matching FilterStages of the previous run.
|
protected TaskFactory |
getTaskFactory() |
void |
handleTaskError(AbstractTask task,
Exception error)
error handler method that will be invoked if an exception occurs during doWork.
|
protected boolean |
isFilterStageListEmpty() |
void |
reset()
Reset the Object to an initial state.
|
void |
schedule()
Schedule this Task on its default Executor for execution.
|
void |
setCurrentFilterStage(FilterStage[] currentFilterStage)
set the FilterStages for the next run.
|
checkInterrupt, copyMessage, dispose, getMessage, isRunnable, removeMessage, setMessage
getTaskExecutor, run, schedule, schedule, setTaskExecutor
setObjectPool
protected static final FilterStage[] EMPTY_FILTERSTAGE
protected FilterStage[] arrayCurrentFilterStage_
protected AbstractFilterTask(TaskFactory taskFactory, TaskExecutor taskExecutor)
public final void doWork() throws InterruptedException
AbstractTask
doWork
in class AbstractTask
InterruptedException
protected abstract void doFilter() throws InterruptedException
InterruptedException
protected TaskFactory getTaskFactory()
protected boolean isFilterStageListEmpty()
protected void addFilterStage(FilterStage s)
protected void addFilterStage(List s)
public void setCurrentFilterStage(FilterStage[] currentFilterStage)
public FilterStage[] getFilterStageToBeProcessed()
public void clearFilterStageToBeProcessed()
public void reset()
AbstractPoolable
reset
in class AbstractMessageTask
public void handleTaskError(AbstractTask task, Exception error)
AbstractTask
task
- the task that caused the error.error
- the exception that was thrown.public void schedule()
Copyright © 2016 JacORB. All rights reserved.