Interface DCCppListener

All Superinterfaces:
AbstractMRListener, EventListener
All Known Implementing Classes:
ClientRxHandler, ConfigBaseStationFrame, DCCppClockControl, DCCppLight, DCCppMonFrame, DCCppPowerManager, DCCppPredefinedMeters, DCCppProgrammer, DCCppSensor, DCCppSensorManager, DCCppThrottle, DCCppThrottleManager, DCCppTurnout, DCCppTurnoutManager, DCCppTurnoutReplyCache, VirtualLCDFrame

public interface DCCppListener extends AbstractMRListener
DCCppListener provides the call-back interface for notification when a new DCC++ message arrives from the layout.

Note that the DCCppListener 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
    Member function that will be invoked by a DCCppInterface implementation to forward a DCC++ message sent to the layout.
    void
    Member function that will be invoked by a DCCppInterface implementation to forward a DCC++ message from the layout.
    void
    Member function invoked by an DCCppInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.
  • Method Details

    • message

      void message(DCCppReply msg)
      Member function that will be invoked by a DCCppInterface implementation to forward a DCC++ message from the layout.
      Parameters:
      msg - The received DCC++ message. Note that this same object may be presented to multiple users. It should not be modified here.
    • message

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

      Member function invoked by an DCCppInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.
      Parameters:
      msg - the message that timed out.