org.drools.examples.broker.events
Class StockTickPersister
java.lang.Object
org.drools.examples.broker.events.StockTickPersister
- All Implemented Interfaces:
- EventSource
public class StockTickPersister
- extends Object
- implements EventSource
A helper to save and load StockTicks
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StockTickPersister
public StockTickPersister()
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.