jmri.managers
Class ManagerDefaultSelector

Show UML class diagram
java.lang.Object
  extended by jmri.managers.ManagerDefaultSelector

public class ManagerDefaultSelector
extends Object

Records and executes a desired set of defaults for the JMRI InstanceManager and ProxyManagers


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:
2.9.4

Nested Class Summary
static class ManagerDefaultSelector.Item
           
 
Field Summary
 Hashtable<Class<?>,String> defaults
           
static ManagerDefaultSelector instance
           
 ManagerDefaultSelector.Item[] knownManagers
           
(package private) static org.slf4j.Logger log
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void configure()
          load into InstanceManager
 String getDefault(Class<?> managerClass)
          Return the userName of the system that provides the default instance for a specific class.
protected  void notifyPropertyChangeListener(String property, Object oldValue, Object newValue)
          Trigger the notification of all PropertyChangeListeners
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void setDefault(Class<?> managerClass, String userName)
          Record the userName of the system that provides the default instance for a specific class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final ManagerDefaultSelector instance

defaults

public Hashtable<Class<?>,String> defaults

knownManagers

public final ManagerDefaultSelector.Item[] knownManagers

log

static org.slf4j.Logger log
Method Detail

getDefault

public String getDefault(Class<?> managerClass)
Return the userName of the system that provides the default instance for a specific class.

Parameters:
managerClass - the specific type, e.g. TurnoutManager, for which a default system is desired
Returns:
userName of the system, or null if none set

setDefault

public void setDefault(Class<?> managerClass,
                       String userName)
Record the userName of the system that provides the default instance for a specific class.

Parameters:
managerClass - the specific type, e.g. TurnoutManager, for which a default system is desired
userName - of the system, or null if none set

configure

public void configure()
load into InstanceManager


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

notifyPropertyChangeListener

protected void notifyPropertyChangeListener(String property,
                                            Object oldValue,
                                            Object newValue)
Trigger the notification of all PropertyChangeListeners



Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads