FreeHEP API
Version current

org.freehep.record.loop.examples
Class RejectEvenStrings

java.lang.Object
  extended byorg.freehep.record.loop.event.RecordAdapter
      extended byorg.freehep.record.loop.examples.RejectEvenStrings
All Implemented Interfaces:
EventListener, RecordListener

public class RejectEvenStrings
extends RecordAdapter

This class is an example of how to RecordListener objects can be used to do conditional processing of events by rejecting certain records that are supplied. This example uses the listener in the EchoStrings example, but this listener is chained behind an instance of this class which is an RecordListener that can reject, if specified, every other record with which is suppiled to it.

Version:
$Id: RejectEvenStrings.java,v 1.1 2003/05/06 23:02:07 tonyj Exp $
Author:
patton
Source Code:
RejectEvenStrings.java

Constructor Summary
RejectEvenStrings()
          Create an instance of this class.
 
Method Summary
static void main(String[] args)
           
 void recordSupplied(RecordSuppliedEvent event)
          Called every time a new record is read by the SequentialRecordLoop's SequentialRecordSource object.
 
Methods inherited from class org.freehep.record.loop.event.RecordAdapter
configure, finish, reconfigure, resume, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RejectEvenStrings

public RejectEvenStrings()
Create an instance of this class.

Method Detail

recordSupplied

public void recordSupplied(RecordSuppliedEvent event)
Description copied from interface: RecordListener
Called every time a new record is read by the SequentialRecordLoop's SequentialRecordSource object.

Specified by:
recordSupplied in interface RecordListener
Overrides:
recordSupplied in class RecordAdapter

main

public static void main(String[] args)
                 throws FileNotFoundException
Throws:
FileNotFoundException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.