org.jacorb.notification.engine
Class AbstractFilterTask

java.lang.Object
  extended byorg.jacorb.notification.util.AbstractPoolable
      extended byorg.jacorb.notification.engine.AbstractTask
          extended byorg.jacorb.notification.engine.AbstractMessageTask
              extended byorg.jacorb.notification.engine.AbstractFilterTask
All Implemented Interfaces:
org.picocontainer.Disposable, Disposable, java.lang.Runnable, Schedulable
Direct Known Subclasses:
FilterConsumerAdminTask, FilterProxyConsumerTask, FilterProxySupplierTask, FilterSupplierAdminTask

public abstract class AbstractFilterTask
extends AbstractMessageTask

Version:
$Id: AbstractFilterTask.java,v 1.17 2005/11/11 19:37:44 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
protected  FilterStage[] arrayCurrentFilterStage_
          FilterStages to process.
protected static FilterStage[] EMPTY_FILTERSTAGE
          empty default value for field arrayCurrentFilterStage_. its used instead of null
 
Fields inherited from class org.jacorb.notification.util.AbstractPoolable
logger_
 
Constructor Summary
protected AbstractFilterTask(TaskFactory taskFactory, TaskExecutor taskExecutor)
           
 
Method Summary
protected  void addFilterStage(FilterStage s)
           
protected  void addFilterStage(java.util.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, java.lang.Exception error)
           
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.
 
Methods inherited from class org.jacorb.notification.engine.AbstractMessageTask
checkInterrupt, copyMessage, dispose, getMessage, isRunnable, removeMessage, setMessage
 
Methods inherited from class org.jacorb.notification.engine.AbstractTask
getTaskExecutor, run, schedule, schedule, setTaskExecutor
 
Methods inherited from class org.jacorb.notification.util.AbstractPoolable
setObjectPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_FILTERSTAGE

protected static final FilterStage[] EMPTY_FILTERSTAGE
empty default value for field arrayCurrentFilterStage_. its used instead of null


arrayCurrentFilterStage_

protected FilterStage[] arrayCurrentFilterStage_
FilterStages to process.

Constructor Detail

AbstractFilterTask

protected AbstractFilterTask(TaskFactory taskFactory,
                             TaskExecutor taskExecutor)
Method Detail

doWork

public final void doWork()
                  throws java.lang.InterruptedException
Description copied from class: AbstractTask
Override this Method in Subclasses to do the "real work".

Specified by:
doWork in class AbstractTask
Throws:
java.lang.InterruptedException

doFilter

protected abstract void doFilter()
                          throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getTaskFactory

protected TaskFactory getTaskFactory()

isFilterStageListEmpty

protected boolean isFilterStageListEmpty()

addFilterStage

protected void addFilterStage(FilterStage s)

addFilterStage

protected void addFilterStage(java.util.List s)

setCurrentFilterStage

public void setCurrentFilterStage(FilterStage[] currentFilterStage)
set the FilterStages for the next run.


getFilterStageToBeProcessed

public FilterStage[] getFilterStageToBeProcessed()
get the matching FilterStages of the previous run.


clearFilterStageToBeProcessed

public void clearFilterStageToBeProcessed()
clear the result of the previous run.


reset

public void reset()
Description copied from class: AbstractPoolable
Reset the Object to an initial state. Subclasses should override this method appropiately to reset the instance to an initial state.

Overrides:
reset in class AbstractMessageTask

handleTaskError

public void handleTaskError(AbstractTask task,
                            java.lang.Exception error)
Parameters:
task - the task that caused the error.
error - the exception that was thrown.

schedule

public void schedule()
Schedule this Task on its default Executor for execution.