Package jmri

Interface LogixManager

  • All Superinterfaces:
    Manager<Logix>, PropertyChangeProvider, SilenceablePropertyChangeProvider, VetoableChangeProvider
    All Known Implementing Classes:
    DefaultLogixManager

    public interface LogixManager
    extends Manager<Logix>
    Interface for obtaining Logixs

    This doesn't have a "new" method, since Logixs are separately implemented, instead of being system-specific.


    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.

    • Method Detail

      • createNewLogix

        Logix createNewLogix​(java.lang.String systemName,
                             java.lang.String userName)
        Create a new Logix if the Logix does not exist.
        Parameters:
        systemName - the system name
        userName - the user name
        Returns:
        a new Logix or null if unable to create: An error, or the Logix already exists
      • createNewLogix

        Logix createNewLogix​(java.lang.String userName)
        For use with User GUI, to allow the auto generation of systemNames, where the user can optionally supply a username.
        Parameters:
        userName - the user name
        Returns:
        a new Logix or null if unable to create
      • getLogix

        Logix getLogix​(java.lang.String name)
        Locate via user name, then system name if needed. Does not create a new one if nothing found
        Parameters:
        name - User name or system name to match
        Returns:
        null if no match found
      • getByUserName

        Logix getByUserName​(java.lang.String s)
        Description copied from interface: Manager
        Locate an existing instance based on a user name.
        Specified by:
        getByUserName in interface Manager<Logix>
        Parameters:
        s - System Name of the required NamedBean
        Returns:
        requested NamedBean object or null if none exists
      • getBySystemName

        Logix getBySystemName​(java.lang.String s)
        Description copied from interface: Manager
        Locate an existing instance based on a system name.
        Specified by:
        getBySystemName in interface Manager<Logix>
        Parameters:
        s - System Name of the required NamedBean
        Returns:
        requested NamedBean object or null if none exists
      • activateAllLogixs

        void activateAllLogixs()
        Activate all Logixs that are not currently active This method is called after a configuration file is loaded.
      • deleteLogix

        void deleteLogix​(Logix x)
        Delete Logix by removing it from the manager. The Logix must first be deactivated so it stops processing.
        Parameters:
        x - the Logix to delete
      • setLoadDisabled

        void setLoadDisabled​(boolean s)
        Support for loading Logixs in a disabled state to debug loops
        Parameters:
        s - true if Logix should be loadable while disabled