Class FailingGeneFetcher

  • All Implemented Interfaces:
    GeneFetcher, InteractorFetcher<Gene>, MockFetcher<Collection<Gene>>

    public class FailingGeneFetcher
    extends AbstractFailingFetcher<Collection<Gene>>
    implements GeneFetcher
    A mock fetcher for testing exceptions. It extends the functionality of the mock fetcher but can also throw exceptions. Upon initialisation, an integer is given which sets how many times a query is made before returning the result. If the current query matches the last query and the counter of the number of times is less than the maxQuery set at initialisation, then an exception will be thrown. Additionally, if the maxQuery is set to -1, the fetcher will always throw an exception.
    Since:
    23/05/13
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)