001    package market.event;
002    
003    import market.SProcessWorker;
004    
005    /**
006     * Listener interface that enables Objects to listen to offer specific events and react on them.
007     */
008    public interface OfferEventListener {
009    
010        /**
011         * Invoked when the global count of an article is needed.
012         *
013         * @param articleKey the key of the article which count is needed.
014         * @param spw the SProcessWorker from which the request came from.
015         */
016        void countArticles(String articleKey, SProcessWorker spw);
017    
018        /**
019         * Invoked when a shortage of an article occured.
020         *
021         * @param articleKey the key of the article which is currently unavaible.
022         */
023        void offerEmpty(String articleKey);
024    
025        /**
026         * Invoked when a delivery enters the market.
027         */
028        void wakeUpOrders();
029    }