com.rhi.architecture.parc.filter
Class NotificationFilter

java.lang.Object
  extended bycom.rhi.architecture.parc.filter.AbstractFilter
      extended bycom.rhi.architecture.parc.filter.NotificationFilter
All Implemented Interfaces:
Filter, Monitor, java.lang.Runnable

public abstract class NotificationFilter
extends AbstractFilter
implements Monitor

NotificationFilter.java

Version:
1.0
Author:
Pete McKinstry

Constructor Summary
NotificationFilter()
          Constructor for NotificationFilter.
 
Method Summary
 void notify(Event e)
          Simple implementation of Monitor interface based on Thread wait/notify mechanism.
 void process()
          Push a collection of records through the filter.
 void run()
          Thread execution method.
 
Methods inherited from class com.rhi.architecture.parc.filter.AbstractFilter
doWork, getErrorChannel, getExceptionHandler, getInbound, getMaxRecords, getName, getOutbound, init, isShutdown, log, markForDeath, numThreads, reset, setErrorChannel, setExceptionHandler, setInbound, setMaxRecords, setNumThreads, setOutbound, stats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationFilter

public NotificationFilter()
Constructor for NotificationFilter.

Method Detail

run

public void run()
Description copied from class: AbstractFilter
Thread execution method. Inherited from Runnable All this method does is call process(). & catch the ProcessingException.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class AbstractFilter
See Also:
Runnable.run()

process

public void process()
             throws ProcessingException
Push a collection of records through the filter.
Details: The NotificationFilter processes records w/in a dependent loop. The exit criteria for the loop is the markForDeath() flag which should be set by the pipeline, _and_ an empty processing cycle. This allows the Strategy to flush the Pipeline w/o knowing much about the inner workings of the Filter. While this criteria is false, the Filter does this: (pseudo-code) InboundChannel.pull(); doWork() OutboundChannel.push();

This method must be threadsafe as it is the fundamental multi-processing hook in the framework.

Specified by:
process in interface Filter
Throws:
ProcessingException
Since:
1.0

notify

public void notify(Event e)
Simple implementation of Monitor interface based on Thread wait/notify mechanism.

Specified by:
notify in interface Monitor
Parameters:
e -
See Also:
Monitor.notify(Event)


Copyright © 2002-2004 Robert Half International. All Rights Reserved.