Class FailingOrganismFetcher

  • All Implemented Interfaces:
    MockFetcher<Organism>, OrganismFetcher

    public class FailingOrganismFetcher
    extends AbstractFailingFetcher<Organism>
    implements OrganismFetcher
    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:
    01/07/13
    Author:
    Gabriel Aldam (galdam@ebi.ac.uk)
    • Constructor Detail

      • FailingOrganismFetcher

        public FailingOrganismFetcher​(int maxQuery)

        Constructor for FailingOrganismFetcher.

        Parameters:
        maxQuery - a int.