Class RandomExceptionThrower

java.lang.Object
org.knowm.xchange.simulated.RandomExceptionThrower
All Implemented Interfaces:
SimulatedExchangeOperationListener

public class RandomExceptionThrower extends Object implements SimulatedExchangeOperationListener
This will cause SimulatedExchange to fail 0.5% of the time with a selection of commnplace transient issues which could happen at any time in real life and should therefore be handled gracefully in client code. Pass this to ExchangeSpecification.getExchangeSpecificParametersItem(String) using the parameter name SimulatedExchange.ON_OPERATION_PARAM during long-running integration testing to inject an appropriate bit of chaos into proceedings.
Author:
Graham Crockford