Package jmri.jmrix.configurexml
Class AbstractStreamConnectionConfigXml
- java.lang.Object
-
- jmri.configurexml.AbstractXmlAdapter
-
- jmri.jmrix.configurexml.AbstractConnectionConfigXml
-
- jmri.jmrix.configurexml.AbstractStreamConnectionConfigXml
-
- All Implemented Interfaces:
XmlAdapter
- Direct Known Subclasses:
DCCppStreamConnectionConfigXml
,LnStreamConnectionConfigXml
,RfidStreamConnectionConfigXml
,SprogCSStreamConnectionConfigXml
,XNetStreamConnectionConfigXml
public abstract class AbstractStreamConnectionConfigXml extends AbstractConnectionConfigXml
Abstract base (and partial implementation) for classes persisting the status of (non-serial) Stream Port adapters.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.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 Modifier and Type Field Description protected AbstractStreamPortController
adapter
-
Constructor Summary
Constructors Constructor Description AbstractStreamConnectionConfigXml()
constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
protected void
extendElement(org.jdom2.Element e)
Customizable method if you need to add anything moreprotected AbstractStreamPortController
getAdapter()
get the stream port adapterprotected abstract void
getInstance(java.lang.Object object)
get instanceAbstractStreamPortController
getStreamAdapter()
get the stream adaptervoid
load(org.jdom2.Element element, java.lang.Object o)
Update static data from XML fileboolean
load(org.jdom2.Element shared, org.jdom2.Element perNode)
load from xml elementsprotected void
setAdapter(AbstractStreamPortController streamPortAdapter)
set the stream port adapterorg.jdom2.Element
store(java.lang.Object object)
Store the object in XML-
Methods inherited from class jmri.jmrix.configurexml.AbstractConnectionConfigXml
findParmValue, getInstance, loadCommon, loadOptions, register, register, saveOptions, setOutputInterval, store, storeCommon, unpackElement
-
Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, loadOrder, setExceptionHandler
-
-
-
-
Field Detail
-
adapter
protected AbstractStreamPortController adapter
-
-
Constructor Detail
-
AbstractStreamConnectionConfigXml
public AbstractStreamConnectionConfigXml()
constructor
-
-
Method Detail
-
setAdapter
protected void setAdapter(AbstractStreamPortController streamPortAdapter)
set the stream port adapter- Parameters:
streamPortAdapter
- the stream port adapter to set
-
getAdapter
protected AbstractStreamPortController getAdapter()
get the stream port adapter- Returns:
- the stream port adapter
-
getStreamAdapter
public AbstractStreamPortController getStreamAdapter()
get the stream adapter- Returns:
- the stream port adapter
-
getInstance
protected abstract void getInstance(java.lang.Object object)
get instance- Parameters:
object
- to get the instance of
-
store
public org.jdom2.Element store(java.lang.Object object)
Store the object in XML- Parameters:
object
- The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.- Returns:
- The XML representation Element
-
extendElement
protected void extendElement(org.jdom2.Element e)
Customizable method if you need to add anything more- Overrides:
extendElement
in classAbstractConnectionConfigXml
- Parameters:
e
- Element being created, update as needed
-
load
public boolean load(org.jdom2.Element shared, org.jdom2.Element perNode)
load from xml elements- Specified by:
load
in interfaceXmlAdapter
- Overrides:
load
in classAbstractXmlAdapter
- Parameters:
shared
- elementperNode
- element- Returns:
- boolean true if successful
-
load
public void load(org.jdom2.Element element, java.lang.Object o)
Update static data from XML file- Specified by:
load
in interfaceXmlAdapter
- Overrides:
load
in classAbstractXmlAdapter
- Parameters:
element
- Top level Element to unpack.o
- Implementation-specific Object needed for the conversion
-
dispose
protected void dispose()
- Specified by:
dispose
in classAbstractConnectionConfigXml
-
-