Class TurnoutLock

  • All Implemented Interfaces:
    Lock

    public class TurnoutLock
    extends java.lang.Object
    implements Lock
    Lock if a turnout isn't in the desired state.

    Can be used to e.g. lock when a call-on (turnout) is set

    • Constructor Detail

      • TurnoutLock

        public TurnoutLock​(java.lang.String name,
                           int okValue)
        Parameters:
        name - System or user name of turnout to monitor
        okValue - If this value isn't present, the operation is locked out
    • Method Detail

      • isLockClear

        public boolean isLockClear​(LockLogger lockLogger)
        Test the lock conditions
        Specified by:
        isLockClear in interface Lock
        Parameters:
        lockLogger - the logger on which to emit status messages
        Returns:
        True if lock is clear and operation permitted
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object