edu.sc.seis.sod.source.event
Class BackwardsEventFinder

java.lang.Object
  extended by edu.sc.seis.sod.source.AbstractSource
      extended by edu.sc.seis.sod.source.event.EventFinder
          extended by edu.sc.seis.sod.source.event.BackwardsEventFinder
All Implemented Interfaces:
SodElement, EventSource, Source

public class BackwardsEventFinder
extends EventFinder


Field Summary
 
Fields inherited from class edu.sc.seis.sod.source.event.EventFinder
increment, lag, refreshInterval
 
Constructor Summary
BackwardsEventFinder(org.w3c.dom.Element config)
           
 
Method Summary
protected  boolean caughtUpWithRealtime()
           
 java.lang.String getDescription()
           
protected  MicroSecondDate getQueryStart()
           
protected  MicroSecondTimeRange getQueryTime()
           
 boolean hasNext()
           
 CacheEvent[] next()
           
protected  void updateQueryEdge(MicroSecondTimeRange queryTime)
           
 
Methods inherited from class edu.sc.seis.sod.source.event.EventFinder
getEventTimeRange, getQueryEdge, getWaitBeforeNext, processConfig, setQueryEdge
 
Methods inherited from class edu.sc.seis.sod.source.AbstractSource
getDNS, getFissuresNamingService, getName, getRetries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackwardsEventFinder

public BackwardsEventFinder(org.w3c.dom.Element config)
                     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface EventSource
Overrides:
getDescription in class EventFinder

hasNext

public boolean hasNext()
Specified by:
hasNext in interface EventSource
Overrides:
hasNext in class EventFinder
Returns:
- false when this event source will return no new events from calls to next

next

public CacheEvent[] next()
Specified by:
next in interface EventSource
Overrides:
next in class EventFinder
Returns:
- the next set of events. Events can be returned from this method multiple times

caughtUpWithRealtime

protected boolean caughtUpWithRealtime()
Overrides:
caughtUpWithRealtime in class EventFinder

updateQueryEdge

protected void updateQueryEdge(MicroSecondTimeRange queryTime)
Overrides:
updateQueryEdge in class EventFinder

getQueryStart

protected MicroSecondDate getQueryStart()
Overrides:
getQueryStart in class EventFinder
Returns:
- the next time to start asking for events

getQueryTime

protected MicroSecondTimeRange getQueryTime()
Overrides:
getQueryTime in class EventFinder
Returns:
- the next time range to be queried for events