Package jmri.jmrix.configurexml
Class AbstractConnectionConfigXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.jmrix.configurexml.AbstractConnectionConfigXml
- All Implemented Interfaces:
XmlAdapter
- Direct Known Subclasses:
AbstractNetworkConnectionConfigXml
,AbstractSerialConnectionConfigXml
,AbstractStreamConnectionConfigXml
,AbstractUsbConnectionConfigXml
,ConnectionConfigXml
,ConnectionConfigXml
,ConnectionConfigXml
,IpocsConnectionConfigXml
,RaspberryPiConnectionConfigXml
public abstract class AbstractConnectionConfigXml extends AbstractXmlAdapter
Abstract base (and partial implementation) for classes persisting the status
of connections.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends Enum<T>>
-
Constructor Summary
Constructors Constructor Description AbstractConnectionConfigXml()
-
Method Summary
Modifier and Type Method Description protected void
checkAndWarnPrefix(String prefix)
Deprecated.4.15.3 part of #4670 migration to parsable prefixesprotected void
extendElement(Element e)
Customizable method if you need to add anything moreprotected String
findParmValue(Element e, String name)
Service routine to look through "parameter" child elements to find a particular parameter valueprotected abstract void
getInstance()
protected void
loadCommon(Element shared, Element perNode, PortAdapter adapter)
load common attributes and elementsprotected void
loadOptions(Element shared, Element perNode, PortAdapter adapter)
load optionsprotected abstract void
register()
protected void
register(ConnectionConfig c)
protected void
saveOptions(Element e, PortAdapter adapter)
save optionsprotected void
setOutputInterval(PortAdapter adapter, Element e)
Store the outputInterval in a connection element for persistence.Element
store(Object o, boolean shared)
Store the object in XMLprotected void
storeCommon(Element e, PortAdapter adapter)
protected void
unpackElement(Element shared, Element perNode)
Method to unpack additional XML structures after connection creation, but before connection is usable.Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, load, loadDeferred, loadOrder, setExceptionHandler
-
Constructor Details
-
Method Details
-
getInstance
-
register
-
register
-
store
Description copied from class:AbstractXmlAdapter
Store the object in XML- Specified by:
store
in interfaceXmlAdapter
- Overrides:
store
in classAbstractXmlAdapter
- Parameters:
o
- The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.shared
- true if the returned element should be the common XML and false if the returned element should be per-node.- Returns:
- The XML representation Element
-
storeCommon
-
extendElement
Customizable method if you need to add anything more- Parameters:
e
- Element being created, update as needed
-
loadCommon
load common attributes and elements- Parameters:
shared
- the shared elementperNode
- the per node elementadapter
- the port adapter
-
checkAndWarnPrefix
Deprecated.4.15.3 part of #4670 migration to parsable prefixesCheck for a deprecated system prefix and warn if found- Parameters:
prefix
- The alphanumeric prefix to test for
-
saveOptions
save options- Parameters:
e
- the elementadapter
- the port adapter
-
loadOptions
load options- Parameters:
shared
- the shared elementperNode
- the per node elementadapter
- the port adapter
-
unpackElement
Method to unpack additional XML structures after connection creation, but before connection is usable.- Parameters:
shared
- connection information common to all nodesperNode
- connection information unique to this node
-
findParmValue
Service routine to look through "parameter" child elements to find a particular parameter value- Parameters:
e
- Element containing parametersname
- name of desired parameter- Returns:
- String value
-
setOutputInterval
Store the outputInterval in a connection element for persistence.- Parameters:
adapter
- the adapter for which properties are storede
- the "connection" element being filled
-