public class LimitedDurationDispatcher extends java.lang.Object implements BitstreamDispatcher
A delegating dispatcher that puts a time limit on the operation of another dispatcher.
Unit testing this class would be possible by abstracting the system time into an abstract clock. We decided this was not worth the candle.
SENTINEL| Constructor and Description |
|---|
LimitedDurationDispatcher(BitstreamDispatcher dispatcher,
java.util.Date endTime)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
next()
Returns the next id for checking, or a sentinel value if there are no
more to check.
|
public LimitedDurationDispatcher(BitstreamDispatcher dispatcher, java.util.Date endTime)
dispatcher - Delegate dispatcher that will do the heavy lifting of the
dispatching work.endTime - when this dispatcher will stop returning valid bitstream ids.public int next()
BitstreamDispatchernext in interface BitstreamDispatcherBitstreamDispatcher.next()Copyright © 2013 DuraSpace. All Rights Reserved.