Package jmri

Interface GlobalProgrammerManager

All Superinterfaces:
PropertyChangeProvider
All Known Implementing Classes:
BiDiBProgrammerManager, CbusDccProgrammerManager, Dcc4PcProgrammerManager, DCCppProgrammerManager, DebugProgrammerManager, DefaultProgrammerManager, DeferringProgrammerManager, EasyDccProgrammerManager, EcosProgrammerManager, LnProgrammerManager, MrcProgrammerManager, Mx1ProgrammerManager, NceProgrammerManager, OlcbProgrammerManager, SprogProgrammerManager, SRCPProgrammerManager, TamsProgrammerManager, TmccProgrammerManager, UhlenbrockProgrammerManager, XNetProgrammerManager, Z21XNetProgrammerManager

Get access to available Programmer objects.

Programmers come in two types:

  • Global, previously "Service Mode" or on a programming track. Request these from an instance of this interface.
  • Addressed, previously "Ops Mode" also known as "programming on the main". Request these from an instance of AddressedProgrammerManager.

This interface also provides a reserve/release system for tools that want to pretend they have exclusive use of a Programmer. This is a cooperative reservation; both tools (first and second reserver) must be using the reserve/release interface.

This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Since:
3.9.6
See Also:
  • Method Details

    • getGlobalProgrammer

      Gain access to the Global Mode Programmer without reservation.
      Returns:
      null only if there isn't a Global Mode Programmer available via this Manager.
    • reserveGlobalProgrammer

      Gain access to the Global Mode Programmer, in the process reserving it for yourself.
      Returns:
      null if the existing Global Mode programmer is in use
    • releaseGlobalProgrammer

      Return access to the Global Mode Programmer, so that it can be used elsewhere.
      Parameters:
      p - the Programmer to release
    • isGlobalProgrammerAvailable

      Convenience method to check whether you'll be able to get a Global Mode programmer.
      Returns:
      false if there's no chance of getting one
    • getUserName

      Provides the human-readable representation for including ProgrammerManagers directly in user interface components, so it should return a user-provided name for this particular one.
      Returns:
      user name of the GlobalProgrammerManager
    • toString

      toString() provides the human-readable representation for including ProgrammerManagers directly in user interface components, so it should return a user-provided name for this particular one.
      Overrides:
      toString in class Object
      Returns:
      String representation of the GlobalProgrammerManager