Package edu.sc.seis.sod.source.event
Class FdsnEvent
java.lang.Object
edu.sc.seis.sod.source.AbstractSource
edu.sc.seis.sod.source.event.AbstractEventSource
edu.sc.seis.sod.source.event.FdsnEvent
- All Implemented Interfaces:
EventSource
,Source
public class FdsnEvent extends AbstractEventSource implements EventSource
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BAD_PARAM_MESSAGE
static java.lang.String
HOST_ELEMENT
static java.lang.String
PORT_ELEMENT
static java.lang.String
URL_ELEMENT
Fields inherited from class edu.sc.seis.sod.source.event.AbstractEventSource
caughtUpToRealtime, EVENT_LAG, EVENT_QUERY_INCREMENT, EVENT_REFRESH_INTERVAL, everCaughtUpToRealtime, increment, lag, lastQueryTime, MIN_INCREMENT, nearRealTimeInterval, refreshInterval, sleepUntilTime
Fields inherited from class edu.sc.seis.sod.source.AbstractSource
name, NAME_ELEMENT, RETRIES_ELEMENT
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description edu.sc.seis.sod.model.common.TimeRange
getEventTimeRange()
java.lang.String
getUserAgent()
boolean
hasNext()
java.util.List<edu.sc.seis.sod.model.event.CacheEvent>
internalNext(edu.sc.seis.sod.model.common.TimeRange queryTime)
edu.sc.seis.sod.model.event.CacheEvent[]
next()
protected java.time.Instant
resetQueryTimeForLag()
Scoots the query time back by the event lag amount from the run properties to the query start time at the earliestvoid
setUserAgent(java.lang.String userAgent)
Methods inherited from class edu.sc.seis.sod.source.event.AbstractEventSource
caughtUpWithRealtime, decreaseQueryTimeWidth, getIncrement, getLag, getQueryEdge, getQueryStart, getQueryTime, getRefreshInterval, getSleepUntilTime, getWaitBeforeNext, increaseQueryTimeWidth, isEverCaughtUpToRealtime, setIncrement, setLag, setQueryEdge, updateQueryEdge
Methods inherited from class edu.sc.seis.sod.source.AbstractSource
appendToName, getName, getRetries, getRetryStrategy, setRetryStrategy
-
Field Details
-
URL_ELEMENT
public static final java.lang.String URL_ELEMENT- See Also:
- Constant Field Values
-
HOST_ELEMENT
public static final java.lang.String HOST_ELEMENT- See Also:
- Constant Field Values
-
PORT_ELEMENT
public static final java.lang.String PORT_ELEMENT- See Also:
- Constant Field Values
-
BAD_PARAM_MESSAGE
public static final java.lang.String BAD_PARAM_MESSAGE- See Also:
- Constant Field Values
-
-
Constructor Details
-
FdsnEvent
public FdsnEvent(edu.sc.seis.seisFile.fdsnws.FDSNEventQueryParams queryParams) -
FdsnEvent
- Throws:
ConfigurationException
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceEventSource
- Returns:
- - false when this event source will return no new events from calls to next
-
next
public edu.sc.seis.sod.model.event.CacheEvent[] next()- Specified by:
next
in interfaceEventSource
- Returns:
- - the next set of events. Events can be returned from this method multiple times
-
internalNext
public java.util.List<edu.sc.seis.sod.model.event.CacheEvent> internalNext(edu.sc.seis.sod.model.common.TimeRange queryTime) throws edu.sc.seis.seisFile.SeisFileException, javax.xml.stream.XMLStreamException- Throws:
edu.sc.seis.seisFile.SeisFileException
javax.xml.stream.XMLStreamException
-
getEventTimeRange
public edu.sc.seis.sod.model.common.TimeRange getEventTimeRange()- Specified by:
getEventTimeRange
in interfaceEventSource
- Returns:
- - a MicroSecondTimeRange starting at least as early as the earliest event and ending at least as late as the latest event. No event should be returned by this source with an origin before the begin time or after the end time of this range.
-
resetQueryTimeForLag
protected java.time.Instant resetQueryTimeForLag()Description copied from class:AbstractEventSource
Scoots the query time back by the event lag amount from the run properties to the query start time at the earliest- Overrides:
resetQueryTimeForLag
in classAbstractEventSource
-
getUserAgent
public java.lang.String getUserAgent() -
setUserAgent
public void setUserAgent(java.lang.String userAgent)
-