Class FailingProteinFetcher

  • All Implemented Interfaces:
    InteractorFetcher<Protein>, MockFetcher<Collection<Protein>>, ProteinFetcher

    public class FailingProteinFetcher
    extends AbstractFailingFetcher<Collection<Protein>>
    implements ProteinFetcher
    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)