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,- RaspberryPiSimulatorConnectionConfigXml
 
 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.AbstractXmlAdapterAbstractXmlAdapter.EnumIO<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends java.lang.Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends java.lang.Enum<T>>
 
- 
 - 
Field Summary- 
Fields inherited from class jmri.configurexml.AbstractXmlAdapterSTR_FALSE, STR_NO, STR_TRUE, STR_YES
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractConnectionConfigXml()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddispose()protected voidextendElement(org.jdom2.Element e)Customizable method if you need to add anything moreprotected java.lang.StringfindParmValue(org.jdom2.Element e, java.lang.String name)Service routine to look through "parameter" child elements to find a particular parameter valueprotected abstract voidgetInstance()protected voidloadCommon(org.jdom2.Element shared, org.jdom2.Element perNode, PortAdapter adapter)Load common attributes and elements.protected voidloadOptions(org.jdom2.Element shared, org.jdom2.Element perNode, PortAdapter adapter)load optionsprotected abstract voidregister()protected voidregister(ConnectionConfig c)protected voidsaveOptions(org.jdom2.Element e, PortAdapter adapter)save optionsprotected voidsetOutputInterval(PortAdapter adapter, org.jdom2.Element e)Store the outputInterval in a connection element for persistence.org.jdom2.Elementstore(java.lang.Object o, boolean shared)Store the object in XMLprotected voidstoreCommon(org.jdom2.Element e, PortAdapter adapter)protected voidunpackElement(org.jdom2.Element shared, org.jdom2.Element perNode)Method to unpack additional XML structures after connection creation, but before connection is usable.- 
Methods inherited from class jmri.configurexml.AbstractXmlAdaptergetAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, load, load, loadDeferred, loadOrder, setExceptionHandler
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface jmri.configurexml.XmlAdapterstore
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractConnectionConfigXmlpublic AbstractConnectionConfigXml() 
 
- 
 - 
Method Detail- 
getInstanceprotected abstract void getInstance() 
 - 
registerprotected abstract void register() 
 - 
registerprotected void register(ConnectionConfig c) 
 - 
storepublic org.jdom2.Element store(java.lang.Object o, boolean shared) Description copied from class:AbstractXmlAdapterStore the object in XML- Specified by:
- storein interface- XmlAdapter
- Overrides:
- storein class- AbstractXmlAdapter
- 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
 
 - 
storeCommonprotected void storeCommon(org.jdom2.Element e, PortAdapter adapter) 
 - 
extendElementprotected void extendElement(org.jdom2.Element e) Customizable method if you need to add anything more- Parameters:
- e- Element being created, update as needed
 
 - 
loadCommonprotected void loadCommon(org.jdom2.Element shared, org.jdom2.Element perNode, PortAdapter adapter) Load common attributes and elements.- Parameters:
- shared- the shared element
- perNode- the per node element
- adapter- the port adapter
 
 - 
saveOptionsprotected void saveOptions(org.jdom2.Element e, PortAdapter adapter) save options- Parameters:
- e- the element
- adapter- the port adapter
 
 - 
loadOptionsprotected void loadOptions(org.jdom2.Element shared, org.jdom2.Element perNode, PortAdapter adapter) load options- Parameters:
- shared- the shared element
- perNode- the per node element
- adapter- the port adapter
 
 - 
unpackElementprotected void unpackElement(org.jdom2.Element shared, org.jdom2.Element perNode) Method to unpack additional XML structures after connection creation, but before connection is usable.- Parameters:
- shared- connection information common to all nodes
- perNode- connection information unique to this node
 
 - 
findParmValueprotected java.lang.String findParmValue(org.jdom2.Element e, java.lang.String name) Service routine to look through "parameter" child elements to find a particular parameter value- Parameters:
- e- Element containing parameters
- name- name of desired parameter
- Returns:
- String value
 
 - 
setOutputIntervalprotected void setOutputInterval(PortAdapter adapter, org.jdom2.Element e) Store the outputInterval in a connection element for persistence.- Parameters:
- adapter- the adapter for which properties are stored
- e- the "connection" element being filled
 
 - 
disposeprotected abstract void dispose() 
 
- 
 
-