001 package org.cocome.tradingsystem.systests.interfaces; 002 003 import java.util.concurrent.TimeoutException; 004 005 /** 006 * Interface for devices which receive updates from the system. This interface 007 * is crucial, as the trading system is asynchronous. So we can not test for a 008 * reaction immediately, but rather have to way for some components to update 009 * their state. However we limit the time to wait for this update, so we avoid 010 * the test to lock up in case of an error and furthermore to test reaction 011 * times (if specified). 012 * 013 * @author Benjamin Hummel 014 * @author $Author: hummel $ 015 * @version $Rev: 47 $ 016 * @levd.rating GREEN Rev: 47 017 */ 018 public interface IUpdateReceiver { 019 020 /** 021 * Wait until the device gets updated (e.g., via a message). If no update 022 * occurs during the requested period throw an exception. 023 * 024 * @param maxMilliseconds 025 * the maximal number of millisecond to wait for an update. 026 * @throws TimeoutException 027 * if no update occurred during the specified duration. 028 */ 029 void waitForUpdate(int maxMilliseconds) throws TimeoutException; 030 }