|
||||||||||
| 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.
| Field Summary | |
|---|---|
static int |
AUDIO
|
static int |
BLOCKBOSS
|
static int |
BLOCKS
|
static int |
CONDITIONALS
|
static int |
ENTRYEXIT
|
static int |
IDTAGS
|
static int |
LAYOUTBLOCKS
|
static int |
LIGHTS
|
static int |
LOGIXS
|
static int |
MEMORIES
|
static int |
OBLOCKS
|
static int |
PANELFILES
|
static int |
REPORTERS
|
static int |
ROUTES
|
static int |
SECTIONS
|
static int |
SENSORGROUPS
|
static int |
SENSORS
The order in which things get saved to the xml file. |
static int |
SIGNALGROUPS
|
static int |
SIGNALHEADS
|
static int |
SIGNALMASTLOGICS
|
static int |
SIGNALMASTS
|
static int |
TIMEBASE
|
static int |
TRANSITS
|
static int |
TURNOUTS
|
static int |
WARRANTS
|
| 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. |
NamedBean |
getBeanBySystemName(String systemName)
Locate an instance based on a system name. |
NamedBean |
getBeanByUserName(String userName)
Locate an instance based on a user name. |
NamedBean |
getNamedBean(String name)
Locate an instance based on a name. |
List<NamedBean> |
getNamedBeanList()
|
String[] |
getSystemNameArray()
|
List<String> |
getSystemNameList()
|
String |
getSystemPrefix()
Provides access to the system prefix string. |
int |
getXMLOrder()
|
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()
Deprecated. 2.9.5 Use getSystemPrefix |
char |
typeLetter()
|
| Field Detail |
|---|
static final int SENSORS
static final int TURNOUTS
static final int LIGHTS
static final int REPORTERS
static final int MEMORIES
static final int SENSORGROUPS
static final int SIGNALHEADS
static final int SIGNALMASTS
static final int SIGNALGROUPS
static final int BLOCKS
static final int OBLOCKS
static final int LAYOUTBLOCKS
static final int SECTIONS
static final int TRANSITS
static final int BLOCKBOSS
static final int ROUTES
static final int WARRANTS
static final int SIGNALMASTLOGICS
static final int IDTAGS
static final int LOGIXS
static final int CONDITIONALS
static final int AUDIO
static final int TIMEBASE
static final int PANELFILES
static final int ENTRYEXIT
| Method Detail |
|---|
@Deprecated char systemLetter()
String getSystemPrefix()
char typeLetter()
String makeSystemName(String s)
void dispose()
String[] getSystemNameArray()
List<String> getSystemNameList()
List<NamedBean> getNamedBeanList()
NamedBean getBeanBySystemName(String systemName)
systemName - System Name of the required NamedBean
NamedBean getBeanByUserName(String userName)
userName - System Name of the required NamedBean
NamedBean getNamedBean(String name)
name - System Name of the required NamedBean
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.
int getXMLOrder()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||