Interface XNetListener

All Superinterfaces:
AbstractMRListener, EventListener
All Known Implementing Classes:
AbstractXNetInitializationManager.XNetInitializer, EliteXNetProgrammer, EliteXNetThrottle, EliteXNetThrottleManager, EliteXNetTurnout, EliteXNetTurnoutManager, LI100XNetProgrammer, LI101Frame, LIUSBConfigFrame, LZ100InternalFrame, RocoXNetThrottle, RocoXNetThrottleManager, StackMonFrame, SystemInfoFrame, XNetConsist, XNetFeedbackMessageCache, XNetHeartBeat, XNetInitializationManager.XNetInitializer, XNetLight, XNetMonPane, XNetOpsModeProgrammer, XNetPowerManager, XNetProgrammer, XNetSensor, XNetSensorManager, XNetThrottle, XNetThrottleManager, XNetTimeSlotListener, XNetTrafficRouter, XNetTurnout, XNetTurnoutManager, Z21XNetOpsModeProgrammer, Z21XNetProgrammer, Z21XNetThrottle, Z21XNetThrottleManager, Z21XNetTurnout, Z21XNetTurnoutManager, Z21XPressNetTunnel, ZTC611XNetTurnout, ZTC611XNetTurnoutManager

public interface XNetListener
extends AbstractMRListener
XNetListener provides the call-back interface for notification when a new XNet message arrives from the layout.

Note that the XNetListener implementation cannot assume that messages will be returned in any particular thread. We may eventually revisit this, as returning messages in the Swing GUI thread would result in some simplification of client code. We've not done that yet because we're not sure that deadlocks can be avoided in that case.

  • Method Summary

    Modifier and Type Method Description
    void message​(XNetMessage msg)
    Member function that will be invoked by an XNetInterface implementation to forward an XNet message sent to the layout.
    void message​(XNetReply msg)
    Member function that will be invoked by an XNetInterface implementation to forward an XNet message from the layout.
    void notifyTimeout​(XNetMessage msg)
    Member function invoked by an XNetInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.
  • Method Details

    • message

      void message​(XNetReply msg)
      Member function that will be invoked by an XNetInterface implementation to forward an XNet message from the layout.
      Parameters:
      msg - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.
    • message

      void message​(XNetMessage msg)
      Member function that will be invoked by an XNetInterface implementation to forward an XNet message sent to the layout. Normally, this function will do nothing.
      Parameters:
      msg - The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.
    • notifyTimeout

      void notifyTimeout​(XNetMessage msg)
      Member function invoked by an XNetInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.
      Parameters:
      msg - message which has timed out.