org.drools.examples.broker.events
Class StockTickPersister

java.lang.Object
  extended by org.drools.examples.broker.events.StockTickPersister
All Implemented Interfaces:
EventSource

public class StockTickPersister
extends Object
implements EventSource

A helper to save and load StockTicks


Constructor Summary
StockTickPersister()
           
 
Method Summary
 void close()
           
 Event<StockTick> getNext()
           
 boolean hasNext()
           
 StockTick load()
           
 void openForRead(Reader reader, long baseTimestamp)
           
 void openForSave(Writer writer)
           
 void save(StockTick tick)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StockTickPersister

public StockTickPersister()
Method Detail

openForSave

public void openForSave(Writer writer)
                 throws IOException
Throws:
IOException

openForRead

public void openForRead(Reader reader,
                        long baseTimestamp)
                 throws FileNotFoundException
Throws:
FileNotFoundException

save

public void save(StockTick tick)
          throws IOException
Throws:
IOException

load

public StockTick load()
               throws ParseException,
                      IOException
Throws:
ParseException
IOException

close

public void close()
           throws IOException
Throws:
IOException

getNext

public Event<StockTick> getNext()
Specified by:
getNext in interface EventSource

hasNext

public boolean hasNext()
Specified by:
hasNext in interface EventSource


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.