|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Manager
Basic interface for access to named, managed objects.
NamedBean objects represent various real elements, and
have a "system name" and perhaps "user name". A specific Manager
object provides access to them by name, and serves as a factory for
new objects.
Right now, this interface just contains the members needed
by InstanceManager to handle
managers for more than one system.
Although they are not defined here because their return type differs, any specific Manager subclass provides "get" methods to locate specific objects, and a "new" method to create a new one via the Factory pattern. The "get" methods will return an existing object or null, and will never create a new object. The "new" method will log a warning if an object already exists with that system name.
add/remove PropertyChangeListener methods are provided. At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify.
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 Summary | |
|---|---|
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 n)
Forget a NamedBean Object created outside the manager. |
void |
dispose()
Free resources when no longer used. |
List |
getSystemNameList()
|
String |
makeSystemName(String s)
|
void |
register(NamedBean n)
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()
|
| Method Detail |
|---|
char systemLetter()
char typeLetter()
String makeSystemName(String s)
void dispose()
List getSystemNameList()
void addPropertyChangeListener(PropertyChangeListener l)
void removePropertyChangeListener(PropertyChangeListener l)
void register(NamedBean n)
The non-system-specific SignalHeadManagers use this method extensively.
void deregister(NamedBean n)
The non-system-specific RouteManager uses this method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||