public class LimitedDurationDispatcher extends 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,
Date endTime)
Main constructor.
|
public LimitedDurationDispatcher(BitstreamDispatcher dispatcher, 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 Bitstream next() throws SQLException
BitstreamDispatchernext in interface BitstreamDispatcherSQLException - if database errorBitstreamDispatcher.next()Copyright © 2016 DuraSpace. All rights reserved.