jmri.managers
Class ManagerDefaultSelector

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
Author:
Bob Jacobsen Copyright (C) 2010

Nested Class Summary
static class ManagerDefaultSelector.Item
           
 
Field Summary
 Hashtable<Class<?>,String> defaults
           
static ManagerDefaultSelector instance
           
 ManagerDefaultSelector.Item[] knownManagers
           
 
Method Summary
 void configure()
          load into InstanceManager
 String getDefault(Class<?> managerClass)
          Return the userName of the system that provides the default instance for a specific class.
 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
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



Copyright © 1997 - 2011 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