Class LimitedDurationDispatcher

  extended by org.dspace.checker.LimitedDurationDispatcher
All Implemented Interfaces:

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.

Jim Downing, Grace Carpenter, Nathan Sarr

Field Summary
Fields inherited from interface org.dspace.checker.BitstreamDispatcher
Constructor Summary
LimitedDurationDispatcher(BitstreamDispatcher dispatcher, Date endTime)
          Main constructor.
Method Summary
 int next()
          Returns the next id for checking, or a sentinel value if there are no more to check.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public LimitedDurationDispatcher(BitstreamDispatcher dispatcher,
                                 Date endTime)
Main constructor.

dispatcher - Delegate dispatcher that will do the heavy lifting of the dispatching work.
endTime - when this dispatcher will stop returning valid bitstream ids.
Method Detail


public int next()
Description copied from interface: BitstreamDispatcher
Returns the next id for checking, or a sentinel value if there are no more to check.

Specified by:
next in interface BitstreamDispatcher
the next bitstream id, or BitstreamDispatcher.SENTINEL if there isn't another value
See Also:

Copyright © 2010 DuraSpace. All Rights Reserved.