jmri.managers
Class AbstractProxyManager

java.lang.Object
  extended by jmri.managers.AbstractProxyManager
All Implemented Interfaces:
Manager
Direct Known Subclasses:
ProxyLightManager, ProxyReporterManager, ProxySensorManager, ProxyTurnoutManager

public class AbstractProxyManager
extends Object
implements Manager

Implementation of a Manager that can serves as a proxy for multiple system-specific implementations.

The first to be added is the "Primary", used if a system letter is not provided.

Author:
Bob Jacobsen Copyright (C) 2003

Constructor Summary
AbstractProxyManager()
           
 
Method Summary
 void addManager(Manager m)
           
 void addPropertyChangeListener(PropertyChangeListener l)
          At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify.
 void deregister(NamedBean s)
          Forget a NamedBean Object created outside the manager.
 void dispose()
          Free resources when no longer used.
 List getSystemNameList()
          Get a list of all system names.
 String makeSystemName(String s)
           
 void register(NamedBean s)
          Remember a NamedBean Object created outside the manager.
 void removePropertyChangeListener(PropertyChangeListener l)
          At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify.
 char systemLetter()
           
 char typeLetter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProxyManager

public AbstractProxyManager()
Method Detail

dispose

public void dispose()
Description copied from interface: Manager
Free resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.

Specified by:
dispose in interface Manager

register

public void register(NamedBean s)
Remember a NamedBean Object created outside the manager.

Forwards the register request to the matching system

Specified by:
register in interface Manager

deregister

public void deregister(NamedBean s)
Forget a NamedBean Object created outside the manager.

Forwards the deregister request to the matching system

Specified by:
deregister in interface Manager

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Description copied from interface: Manager
At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify.

Specified by:
addPropertyChangeListener in interface Manager

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Description copied from interface: Manager
At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify.

Specified by:
removePropertyChangeListener in interface Manager

systemLetter

public char systemLetter()
Specified by:
systemLetter in interface Manager
Returns:
The system-specific prefix letter for the primary implementation

typeLetter

public char typeLetter()
Specified by:
typeLetter in interface Manager
Returns:
The type letter for turnouts

makeSystemName

public String makeSystemName(String s)
Specified by:
makeSystemName in interface Manager
Returns:
A system name from a user input, typically a number.

getSystemNameList

public List getSystemNameList()
Get a list of all system names.

Specified by:
getSystemNameList in interface Manager

addManager

public void addManager(Manager m)


Copyright © 1997 - 2008 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: SourceForge_Logo