001package jmri.jmrix.zimo;
002
003/**
004 * Mx1Listener provides the call-back interface for notification when a new MX-1
005 * message arrives from the layout.
006 * <p>
007 * Note that the Mx1Listener implementation cannot assume that messages will be
008 * returned in any particular thread. We may eventually revisit this, as
009 * returning messages in the Swing GUI thread would result in some
010 * simplification of client code. We've not done that yet because we're not sure
011 * that deadlocks can be avoided in that case.
012 *
013 * @author Bob Jacobsen Copyright (C) 2002
014  *
015 * Adapted by Sip Bosch for use with Zimo Mx-1
016 */
017public interface Mx1Listener extends java.util.EventListener {
018
019    /**
020     * Member function that will be invoked by a Mx1Interface implementation to
021     * forward a MX-1 message from the layout.
022     *
023     * @param msg The received MX-1 message. Note that this same object may be
024     *            presented to multiple users. It should not be modified here.
025     */
026    void message(Mx1Message msg);
027}
028
029
030